package com.aspose.cells;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;

class zbwo {
   private Workbook c;
   private WorksheetCollection d;
   private int e = 15;
   private Cells f;
   private Worksheet g;
   int a;
   private LightCellsDataHandler h;
   private boolean i;
   private boolean j;
   private zbbj[] k = new zbbj[32];
   private boolean l;
   private boolean m;
   private int n;
   private int o;
   private int p;
   private boolean q;
   private HashMap r = new HashMap();
   private zbbj s = new zbbj();
   private zbbj t;
   private zr u;
   private zp v;
   private zbaz w;
   private zp x;
   private Row y;
   private zfv z = new zfv();
   private zfv A;
   private int B = -1;
   private int C = -1;
   private int D = -1;
   private RowCollection E;
   private zagg F;
   private zahs G;
   private HashMap H;
   private int[] I = null;
   private int J = 1;
   private int K = 5;
   private int L;
   private int M;
   private byte[] N;
   private byte[] O;
   private ArrayList P;
   private HashMap Q = new HashMap();
   private ArrayList R;
   private ArrayList S;
   zvh b;
   private zvh T = null;
   private HashMap U = new HashMap();

   private boolean a(int var1) {
      this.l = true;
      if (this.p == var1) {
         return !this.q;
      } else {
         this.f();
         this.t = this.s;
         if (this.n > 0) {
            if (var1 > this.p) {
               if (!this.c(var1)) {
                  this.t = this.s;
               }
            } else {
               if (this.o >= this.n) {
                  this.o = this.n - 1;
               }

               this.t = this.k[this.o];
               if (this.t.a > var1) {
                  if (this.o > 0) {
                     --this.o;

                     while(true) {
                        this.t = this.k[this.o];
                        if (this.t.a == var1) {
                           break;
                        }

                        if (this.t.a < var1) {
                           ++this.o;
                           this.t = this.s;
                           break;
                        }

                        if (this.o == 0) {
                           this.t = this.s;
                           break;
                        }

                        --this.o;
                     }
                  }
               } else if (this.t.a < var1) {
                  ++this.o;
                  this.t = this.s;
               }
            }
         }

         this.p = var1;
         if (this.i && !this.h.startRow(var1)) {
            this.q = true;
            return false;
         } else {
            if (this.m) {
               this.s.a(0, this.f);
               this.m = false;
            }

            this.t.a = var1;
            this.e();
            this.C = -1;
            if (this.i && !this.h.processRow(this.y)) {
               this.q = true;
               if (this.B > -1) {
                  this.u.c(this.B, 1);
               }

               return false;
            } else {
               return true;
            }
         }
      }
   }

   private boolean c() {
      if (this.i && !this.h.startCell(this.z.a)) {
         return false;
      } else {
         this.C = this.x.a(this.z.a, this.C);
         if (this.C < 0) {
            this.C = this.x.a(-this.C - 1, this.z);
         }

         this.A = this.x.a(this.C, this.z, 6);
         return true;
      }
   }

   private boolean d() {
      this.x.b(this.C, this.A, 6);
      if (this.i && !this.h.processCell(new Cell(this.y, this.C, this.A, this.A == this.z))) {
         this.x.c(this.C, 1);
         return false;
      } else {
         if (this.A.a > this.D) {
            this.D = this.A.a;
         }

         return true;
      }
   }

   private void e() {
      this.w.e(-1);
      this.B = this.u.a(this.p, this.B);
      if (this.B > -1) {
         this.v = this.u.f(this.B);
         if (this.t == this.s) {
            this.t = this.v.a(new zbbj(), 15);
         }

         int var1 = this.v.a();
         if (var1 > 0) {
            this.x = this.w.f(this.w.a(-1, this.t, Math.max(32, var1)));
            this.x.a(-1, this.v, -1, var1, false);
         } else {
            this.x = this.w.f(this.w.a(-1, this.t, 32));
         }
      } else {
         this.x = this.w.f(this.w.a(-1, this.t, 32));
      }

      this.y = new Row(this.f, this.E, this.x, false);
   }

   private void f() {
      if (this.p > -1 && !this.q && (!this.i || this.x.a() > 0)) {
         if (this.B < 0) {
            this.B = this.u.a(-this.B - 1, this.x, false);
            this.u.f(this.B).l(0, 0);
         } else {
            this.v.b(this.t, 13);
            this.v.a(this.x, false);
            this.v.l(0, 0);
         }
      }

   }

   zbwo(Workbook var1, LoadOptions var2) throws Exception {
      this.c = var1;
      this.d = this.c.getWorksheets();
      this.d.clear();
      this.N = new byte[2];
      if (var2 == null) {
         this.a = 65535;
         this.h = null;
         this.i = false;
         this.j = true;
      } else {
         this.a = var2.b();
         this.h = var2.getLightCellsDataHandler();
         this.i = this.h != null;
         this.j = this.i || (this.a & 1) != 0;
      }

   }

   private void f(zpb var1) throws Exception {
      this.L = var1.b(this.N);
      if ((this.L & '\uffff') != 2057) {
         throw new Exception("Bad Workbook file format.");
      } else {
         this.M = var1.b(this.N);
         this.O = new byte[this.M];
         var1.a(this.O);
         if (this.O[1] == 6) {
            if ((this.O[0] & 255) == 128) {
               throw new CellsException(19, "This Excel files contains Microsoft Graph Charts.");
            } else {
               this.K = 5;
            }
         } else if (this.O[1] == 5) {
            throw new CellsException(19, "This Excel files contains (Excel95 or earlier file format) records.");
         } else {
            throw new CellsException(19, "Bad Workbook file format.");
         }
      }
   }

   private void a(int var1, zpb var2) throws Exception {
      while(true) {
         this.L = var2.b(this.N);
         if (this.L == var1) {
            return;
         }

         this.M = var2.b(this.N);
         var2.a(this.M & '\uffff');
      }
   }

   private void g(zpb var1) throws Exception {
      if (this.j) {
         this.a(var1);
         zxw var2 = new zxw();
         var2.b(this.O);
         com.aspose.cells.b.a.a.ze.a(this.d.A(), (Object)var2);
         int var3 = com.aspose.cells.b.a.zc.e(this.O, 0);
         if ((var3 & '\uffff') > (this.d.w() & '\uffff')) {
            this.d.e(var3);
         }

         while(true) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 1054) {
               var1.a(-2);
               break;
            }

            this.a(var1);
            var2 = new zxw();
            var2.b(this.O);
            com.aspose.cells.b.a.a.ze.a(this.d.A(), (Object)var2);
            var3 = com.aspose.cells.b.a.zc.e(this.O, 0);
            if ((var3 & '\uffff') > (this.d.w() & '\uffff')) {
               this.d.e(var3);
            }
         }
      } else {
         this.h(var1);

         while(true) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 1054) {
               var1.a(-2);
               break;
            }

            this.h(var1);
         }
      }

   }

   private void h(zpb var1) throws Exception {
      this.M = var1.b(this.N);
      var1.a(this.M & '\uffff');
   }

   int a(zpb var1) throws Exception {
      this.M = var1.b(this.N);
      if ((this.M & '\uffff') != 0) {
         this.O = new byte[this.M];
         var1.a(this.O);
      } else {
         this.O = null;
      }

      return this.M;
   }

   private void i(zpb var1) throws Exception {
      if (this.P == null) {
         this.P = new ArrayList();
      }

      if (this.j) {
         this.a(var1);
         com.aspose.cells.b.a.a.ze.a(this.P, (Object)this.O);
      } else {
         this.h(var1);
      }

      while(true) {
         this.L = var1.b(this.N);
         if ((this.L & '\uffff') != 224) {
            var1.a(-2);
            return;
         }

         if (this.j) {
            this.a(var1);
            com.aspose.cells.b.a.a.ze.a(this.P, (Object)this.O);
         } else {
            this.h(var1);
         }
      }
   }

   private void j(zpb var1) {
      try {
         String var2;
         if (this.O[7] == 0) {
            byte[] var4 = new byte[2 * this.O.length - 16];

            for(int var5 = 0; var5 < this.O.length - 8; ++var5) {
               var4[2 * var5] = this.O[8 + var5];
            }

            var2 = Encoding.getUnicode().a(var4);
         } else {
            var2 = Encoding.getUnicode().a(this.O, 8, this.O.length - 8);
         }

         if (var2.length() >= 32) {
            var2 = var2.substring(0, 31);
         }

         int var3 = this.d.c(var2);
         if (this.I != null && var3 < this.I.length) {
            this.d.get(var3).d = this.I[var3];
            this.d.b = this.J;
         }

         this.Q.put(com.aspose.cells.b.a.zc.a(this.O, 0), var3);
         this.d.get(var3).a(this.O[4]);
         switch(this.O[5]) {
         case 0:
            this.d.get(var3).setType(1);
            break;
         case 1:
            this.d.get(var3).setType(3);
            break;
         case 2:
            this.d.get(var3).setType(2);
            break;
         case 3:
         case 4:
         case 5:
         default:
            this.d.get(var3).setType(4);
            break;
         case 6:
            this.d.get(var3).setType(0);
         }

      } catch (Exception var6) {
         throw new CellsException(6, "Invalid sheet name info");
      }
   }

   private void k(zpb var1) throws Exception {
      if (this.j) {
         ArrayList var2 = new ArrayList();
         this.a(var1);
         com.aspose.cells.b.a.a.ze.a(var2, (Object)this.O);

         while(true) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 60) {
               var1.a(-2);
               zbby.a(var2, this.d);
               break;
            }

            this.a(var1);
            com.aspose.cells.b.a.a.ze.a(var2, (Object)this.O);
         }
      } else {
         this.h(var1);

         while(true) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 60) {
               var1.a(-2);
               break;
            }

            this.h(var1);
         }
      }

   }

   void b(zpb var1) throws Exception {
      this.f(var1);

      label470:
      while(true) {
         this.L = var1.b(this.N);
         int var5;
         int var6;
         int var7;
         switch(this.L) {
         case 10:
            var1.a(2);
            int var2 = ((this.d.I() * 8 + this.d.J()) / 8 + 1) * 8;
            double var3 = (double)(var2 - this.d.J()) / (double)this.d.I();

            for(var5 = 0; var5 < this.d.getCount(); ++var5) {
               Cells var34 = this.d.get(var5).getCells();
               var34.getColumns().a(var3);
            }

            zhu.c();
            return;
         case 14:
            this.a(var1);
            if (this.O[0] == 0) {
               this.d.n().getSettings().setPrecisionAsDisplayed(true);
            }
            break;
         case 18:
            this.a(var1);
            if ((this.M & '\uffff') != 0 && this.O[0] == 1) {
               this.d.N().b = true;
            }
            break;
         case 19:
            this.a(var1);
            var5 = com.aspose.cells.b.a.zc.e(this.O, 0);
            if ((var5 & '\uffff') != 0) {
               this.d.N().a(var5);
            }
            break;
         case 23:
            this.n(var1);
            break;
         case 24:
            this.x(var1);
            break;
         case 25:
            this.a(var1);
            if ((this.M & '\uffff') != 0 && this.O[0] == 1) {
               this.d.N().a = true;
            }
            break;
         case 34:
            this.a(var1);
            if (this.O != null && this.O[0] != 0) {
               this.d.n().getSettings().setDate1904(true);
            }
            break;
         case 47:
            this.M = var1.b(this.N);
            this.O = new byte[this.M];
            var1.a(this.O);
            if (this.O[0] == 0 && this.O[1] == 0) {
               String var29 = this.c.getSettings().getPassword();
               if (this.c.getSettings().getPassword() == null || "".equals(this.c.getSettings().getPassword())) {
                  var29 = "VelvetSweatshop";
               }

               var6 = com.aspose.cells.b.a.zc.e(this.O, 2);
               var7 = com.aspose.cells.b.a.zc.e(this.O, 4);
               if (!zbw.a(var29, var7, var6)) {
                  throw new CellsException(8, "Invalid password.");
               }

               this.a((com.aspose.cells.b.a.d.zm)var1.a, (zvh)this.T, (zbw)(new zbw(var29)));
            } else if (this.O[4] == 1) {
               byte[] var28 = new byte[16];
               byte[] var32 = new byte[16];
               byte[] var31 = new byte[16];
               System.arraycopy(this.O, 6, var28, 0, 16);
               System.arraycopy(this.O, 22, var32, 0, 16);
               System.arraycopy(this.O, 38, var31, 0, 16);

               try {
                  zsg var33 = null;
                  if (this.c.getSettings().getPassword() != null && !"".equals(this.c.getSettings().getPassword())) {
                     var33 = new zsg(this.c.getSettings().getPassword(), var28, var32, var31);
                  } else {
                     var33 = new zsg("VelvetSweatshop", var28, var32, var31);
                  }

                  this.a((com.aspose.cells.b.a.d.zm)var1.a, (zvh)this.T, (zsg)var33);
               } catch (Exception var24) {
                  if (this.c.getSettings().getPassword() != null && !"".equals(this.c.getSettings().getPassword())) {
                     throw new CellsException(8, "Invalid password.");
                  }

                  throw new CellsException(8, "Please provide password for the Workbook file.");
               }
            } else {
               var5 = com.aspose.cells.b.a.zc.a(this.O, 10);
               byte var27 = 10;
               long var30 = com.aspose.cells.b.a.zc.d(this.O, var27 + 12);
               long var9 = com.aspose.cells.b.a.zc.d(this.O, var27 + 16);
               long var11 = com.aspose.cells.b.a.zc.d(this.O, var27 + 20);
               long var13 = com.aspose.cells.b.a.zc.d(this.O, var27 + 24);
               String var15 = Encoding.getUnicode().a(this.O, var27 + 36, var5 - 34);
               var6 = 14 + var5;
               var5 = com.aspose.cells.b.a.zc.a(this.O, var6);
               var6 += 4;
               byte[] var16 = new byte[var5];
               byte[] var17 = new byte[var5];
               System.arraycopy(this.O, var6, var16, 0, var5);
               var6 += var5;
               System.arraycopy(this.O, var6, var17, 0, var5);
               var6 += var5;
               var5 = com.aspose.cells.b.a.zc.a(this.O, var6);
               byte[] var18 = new byte[var5];
               var6 += 4;
               System.arraycopy(this.O, var6, var18, 0, var5);
               int var10000 = var6 + var5;

               try {
                  zby var19 = null;
                  if (this.c.getSettings().getPassword() != null && !"".equals(this.c.getSettings().getPassword())) {
                     var19 = new zby(this.c.getSettings().getPassword(), var16, var15, var13, 0L, var9, var30, var11);
                  } else {
                     var19 = new zby("VelvetSweatshop", var16, var15, var13, 0L, var9, var30, var11);
                  }

                  if (!var19.b(var17, var18)) {
                     throw new CellsException(8, "Invalid password.");
                  }

                  this.a((com.aspose.cells.b.a.d.zm)var1.a, (zvh)this.T, (zby)var19);
                  this.d.n().a(3);
                  this.d.n().b((int)(var11 & 4294967295L));
               } catch (Exception var25) {
                  if (this.c.getSettings().getPassword() != null && !"".equals(this.c.getSettings().getPassword())) {
                     throw new CellsException(8, "Invalid password.");
                  }

                  throw new CellsException(8, "Please provide password for the Workbook file.");
               } finally {
                  ;
               }
            }
            break;
         case 49:
            this.u(var1);
            break;
         case 60:
            this.h(var1);
            break;
         case 61:
            this.v(var1);
            break;
         case 66:
            this.a(var1);
            this.d.n().getSettings().b = com.aspose.cells.b.a.zc.b(this.O, 0);
            break;
         case 91:
            this.a(var1);
            this.d.n().getSettings().setRecommendReadOnly(this.O[0] == 1);
            this.d.n().getSettings().a(com.aspose.cells.b.a.zc.e(this.O, 2));
            break;
         case 92:
         case 193:
         case 194:
         case 195:
         case 225:
         case 226:
            if (this.a == 65535) {
               this.a(var1, this.L & '\uffff');
               if (this.d.y().a() == null) {
                  this.d.y().a(new ArrayList());
               }

               com.aspose.cells.b.a.a.ze.a(this.d.y().a(), (Object)this.O);
            } else {
               this.h(var1);
            }
            break;
         case 133:
            this.q(var1);
            break;
         case 134:
            this.a(var1);
            this.d.n().getSettings().setWriteProtected(true);
            break;
         case 140:
            this.E(var1);
            break;
         case 141:
            this.a(var1);
            switch(this.O[0]) {
            case 0:
               this.d.n().getSettings().setDisplayDrawingObjects(0);
               continue;
            case 1:
               this.d.n().getSettings().setDisplayDrawingObjects(1);
               continue;
            case 2:
               this.d.n().getSettings().setDisplayDrawingObjects(2);
            default:
               continue;
            }
         case 146:
            this.p(var1);
            break;
         case 156:
            this.a(var1);
            this.d.y().a(com.aspose.cells.b.a.zc.e(this.O, 0));
            break;
         case 211:
            this.M = var1.b(this.N);
            if ((this.M & '\uffff') != 0) {
               var1.a(this.M & '\uffff');
            }

            this.d.b(true);
            break;
         case 213:
            this.m(var1);
            break;
         case 218:
            this.a(var1);
            this.d.n().getSettings().a(com.aspose.cells.b.a.zc.b(this.O, 0));
            break;
         case 222:
            this.a(var1);
            var5 = com.aspose.cells.b.a.zc.e(this.O, 2) & '\uffff';
            var6 = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
            var7 = this.O[6] & 255;
            int var8 = this.O[7] & 255;
            this.d.setOleSize(var5, var6, var7, var8);
            break;
         case 224:
            this.i(var1);
            break;
         case 235:
            if ((this.a & 4) != 0) {
               this.a(var1, this.d.Q());
            } else {
               this.h(var1);
            }
            break;
         case 252:
            this.k(var1);
            break;
         case 317:
            this.a(var1);
            if ((this.M & '\uffff') <= 0) {
               break;
            }

            this.I = new int[(this.M & '\uffff') / 2];
            var5 = 0;

            while(true) {
               if (var5 >= this.I.length) {
                  continue label470;
               }

               this.I[var5] = com.aspose.cells.b.a.zc.e(this.O, var5 * 2) & '\uffff';
               if (this.I[var5] == 0) {
                  this.I = null;
                  this.J = 1;
                  continue label470;
               }

               if (this.I[var5] > this.J) {
                  this.J = this.I[var5];
               }

               ++var5;
            }
         case 352:
            this.a(var1);
            if (this.O[0] != 0 || this.O[1] != 0) {
               this.d.a(true);
            }
            break;
         case 425:
            this.ae(var1);
            break;
         case 430:
            this.o(var1);
            break;
         case 431:
            this.a(var1);
            this.d.y().a(this.O);
            break;
         case 442:
            this.a(var1);
            if (this.O[2] == 0) {
               this.d.e = zco.a(this.O, 3, this.O.length - 3);
            } else {
               this.d.e = Encoding.getUnicode().a(this.O, 3, this.O.length - 3);
            }
            break;
         case 444:
            this.a(var1);
            this.d.y().b(this.O);
            break;
         case 445:
            this.M = var1.b(this.N);
            if ((this.M & '\uffff') != 0) {
               var1.a(this.M & '\uffff');
            }

            this.d.c(true);
            break;
         case 659:
            this.r(var1);
            break;
         case 1054:
            this.g(var1);
            break;
         case 2147:
            if (this.a == 65535) {
               this.a(var1);
               this.d.n().getSettings().b().a(this.O);
            } else {
               this.h(var1);
            }
            break;
         case 2148:
            if (this.a == 65535) {
               this.a(var1);
               com.aspose.cells.b.a.a.ze.a(this.d.y().b(), (Object)this.O);
            } else {
               this.h(var1);
            }
            break;
         case 2150:
            if ((this.a & 4) != 0) {
               this.a(var1, this.d.S());
            } else {
               this.h(var1);
            }
            break;
         case 2173:
            this.al(var1);
            break;
         case 2188:
            this.a(var1);
            this.d.n().getSettings().setCheckComptiliblity(this.O[12] == 0);
            break;
         case 2189:
            this.am(var1);
            break;
         case 2190:
            this.s(var1);
            break;
         case 2196:
            this.w(var1);
            break;
         case 2198:
            this.l(var1);
            break;
         default:
            this.M = var1.b(this.N);
            var1.a(this.M & '\uffff');
         }
      }
   }

   private void l(zpb var1) throws Exception {
      this.a(var1);
      if ((this.M & '\uffff') >= 16) {
         this.d.n().c.c = com.aspose.cells.b.a.zc.a(this.O, 12);
      }

      com.aspose.cells.b.a.d.zh var2 = new com.aspose.cells.b.a.d.zh();
      var2.b(this.O, 16, (this.M & '\uffff') - 16);

      while(true) {
         this.L = var1.b(this.N);
         if ((this.L & '\uffff') != 2175) {
            var1.a(-2);
            if (var2.h() == 0L) {
               return;
            } else {
               try {
                  var2.b(0L);
                  com.aspose.cells.a.f.zi var3 = com.aspose.cells.a.f.zi.a((com.aspose.cells.b.a.d.zm)var2);
                  String var4 = "theme/theme/theme1.xml";
                  if (var3.a(var4, true) != -1) {
                     com.aspose.cells.a.f.zh var5 = var3.a(var4);
                     com.aspose.cells.b.a.d.zm var6 = var3.a(var5);
                     zcfk var7 = zass.a((com.aspose.cells.b.a.d.zm)var6, (zcft)null, true);
                     var6.a();
                     zajr var8 = new zajr(this.d.n(), var4);
                     var8.a(var7, true);
                  }

                  var3.b();
               } catch (Exception var9) {
                  ;
               }

               return;
            }
         }

         this.a(var1);
         var2.b(this.O, 12, (this.M & '\uffff') - 12);
      }
   }

   private void m(zpb var1) throws Exception {
      if ((this.a & 64) != 0) {
         zauk var2 = null;

         while(true) {
            switch(this.L) {
            case 133:
            case 352:
            case 425:
               var1.a(-2);
               return;
            case 213:
               this.a(var1, this.L & '\uffff');
               var2 = new zauk(this.d.U());
               this.d.U().b(var2);
               ++this.d.U().d;
               var2.z = new ArrayList();
               var2.r = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
               if (var2.r > this.d.U().c) {
                  this.d.U().c = var2.r;
               }
               break;
            case 227:
               this.a(var1, this.L & '\uffff');
               int var3 = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
               var2.d = zsk.b(var3);
               break;
            default:
               this.a(var1, this.L & '\uffff');
            }

            com.aspose.cells.b.a.a.ze.a(var2.z, (Object)this.O);
            this.L = var1.b(this.N);
         }
      } else {
         while(true) {
            switch(this.L) {
            case 133:
            case 352:
            case 425:
               var1.a(-2);
               return;
            default:
               this.h(var1);
            }
         }
      }
   }

   private void n(zpb var1) throws Exception {
      if (!this.i && this.a == 0) {
         this.h(var1);
      } else {
         zbqf var2 = this.d.v();
         boolean var3 = false;

         int var4;
         for(var4 = 0; var4 < var2.getCount(); ++var4) {
            zbqg var5 = var2.a(var4);
            if (var5.e()) {
               var3 = true;
               break;
            }
         }

         if (!var3) {
            zbqg var10 = new zbqg(1);
            this.d.d(var2.getCount());
            var2.a(var10);
         }

         this.a(var1);
         var4 = com.aspose.cells.b.a.zc.e(this.O, 0);
         this.d.q().clear();
         int var6;
         int var7;
         int var8;
         int var11;
         if ((var4 & '\uffff') * 6 + 2 > this.O.length) {
            var11 = (this.O.length - 2) / 6;

            int var9;
            for(var6 = 0; var6 < var11; ++var6) {
               var7 = com.aspose.cells.b.a.zc.e(this.O, 6 * var6 + 2);
               var8 = com.aspose.cells.b.a.zc.e(this.O, 6 * var6 + 4);
               var9 = com.aspose.cells.b.a.zc.e(this.O, 6 * var6 + 6);
               this.d.q().b(var7, var8, var9);
            }

            while(true) {
               this.L = var1.b(this.N);
               if ((this.L & '\uffff') != 60) {
                  var1.a(-2);
                  break;
               }

               this.a(var1);
               var11 = this.O.length / 6;

               for(var6 = 0; var6 < var11; ++var6) {
                  var7 = com.aspose.cells.b.a.zc.e(this.O, 6 * var6);
                  var8 = com.aspose.cells.b.a.zc.e(this.O, 6 * var6 + 2);
                  var9 = com.aspose.cells.b.a.zc.e(this.O, 6 * var6 + 4);
                  this.d.q().b(var7, var8, var9);
               }
            }
         } else {
            for(var11 = 0; var11 < (var4 & '\uffff'); ++var11) {
               var6 = com.aspose.cells.b.a.zc.e(this.O, 6 * var11 + 2);
               var7 = com.aspose.cells.b.a.zc.e(this.O, 6 * var11 + 4);
               var8 = com.aspose.cells.b.a.zc.e(this.O, 6 * var11 + 6);
               this.d.q().b(var6, var7, var8);
            }
         }

      }
   }

   private void o(zpb var1) throws Exception {
      this.a(var1);
      if (this.d.v() == null) {
         this.d.a(new zbqf());
      }

      zbqg var2 = new zbqg();
      byte var4;
      int var5;
      byte[] var6;
      int var7;
      int var12;
      if (this.O.length == 4) {
         if (this.O[2] == 1 && this.O[3] == 4) {
            var2.a(1);
            this.d.d(this.d.v().getCount());
         } else if (this.O[2] == 1 && this.O[3] == 58) {
            var2.a(2);
         }
      } else {
         int var3 = com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff';
         var2.a(var3 == 0 ? 3 : 0);
         var4 = 2;
         var5 = com.aspose.cells.b.a.zc.e(this.O, var4) & '\uffff';
         if (this.O[var4 + 2] == 1) {
            var2.d(Encoding.getUnicode().a(this.O, var4 + 3, var5 * 2));
            var12 = var4 + 3 + var5 * 2;
         } else {
            var6 = new byte[2 * var5];

            for(var7 = 0; var7 < var5; ++var7) {
               var6[2 * var7] = this.O[var4 + 3 + var7];
            }

            var2.d(Encoding.getUnicode().a(var6, 0, var6.length));
            var12 = var4 + 3 + var5;
         }

         if (var3 == 0 && (var5 > 1 && var2.i().charAt(0) == 1 || var2.i().indexOf(3) == -1)) {
            var2.a(0);
         }

         String var14 = zbqg.f(var2.i());
         if (var3 != 0) {
            String[] var15 = new String[var3];

            for(int var8 = 0; var8 < var3; ++var8) {
               var5 = com.aspose.cells.b.a.zc.e(this.O, var12) & '\uffff';
               if (this.O[var12 + 2] == 1) {
                  var15[var8] = Encoding.getUnicode().a(this.O, var12 + 3, var5 * 2);
                  var12 += 3 + var5 * 2;
               } else {
                  byte[] var9 = new byte[2 * var5];

                  for(int var10 = 0; var10 < var5 && var12 + 3 + var10 < this.O.length; ++var10) {
                     var9[2 * var10] = this.O[var12 + 3 + var10];
                  }

                  var15[var8] = Encoding.getUnicode().a(var9, 0, var9.length);
                  var12 += 3 + var5;
               }

               if (var12 >= (this.M & '\uffff') && var8 != var3 - 1) {
                  this.L = var1.b(this.N);
                  if ((this.L & '\uffff') != 60) {
                     var1.a(-2);
                     break;
                  }

                  this.a(var1);
                  var12 = 0;
               }
            }

            var2.a(var15);
         }
      }

      while(true) {
         this.L = var1.b(this.N);
         if ((this.L & '\uffff') != 35) {
            var1.a(-2);
            this.d.v().a(var2);

            while(true) {
               this.L = var1.b(this.N);
               if ((this.L & '\uffff') != 89) {
                  var1.a(-2);
                  return;
               }

               this.a(var1, var2);
            }
         }

         this.a(var1);
         zuk var11 = new zuk(var2);
         var11.d(com.aspose.cells.b.a.zc.e(this.O, 0));
         var11.a(com.aspose.cells.b.a.zc.a(this.O, 2));
         var4 = 8;
         if (var11.i()) {
            var11.b = this.O[var4] & 255;
            switch(this.O[var4]) {
            case 0:
               var11.a("CONSOLIDATE_AREA");
               break;
            case 1:
               var11.a("AUTO_OPEN");
               break;
            case 2:
               var11.a("AUTO_CLOSE");
               break;
            case 3:
               var11.a("EXTRACT");
               break;
            case 4:
               var11.a("DATABASE");
               break;
            case 5:
               var11.a("CRITERIA");
               break;
            case 6:
               var11.a("PRINT_AREA");
               break;
            case 7:
               var11.a("PRINT_TITLES");
               break;
            case 8:
               var11.a("RECORDER");
               break;
            case 9:
               var11.a("DATA_FORM");
               break;
            case 10:
               var11.a("AUTO_ACTIVATE");
               break;
            case 11:
               var11.a("AUTO_DEACTIVATE");
               break;
            case 12:
               var11.a("SHEET_TITLE");
               break;
            case 13:
               var11.a("_FILTERDATABASE");
            }

            var12 = var4 + 1;
         } else if (this.O[7] != 0) {
            var11.a(Encoding.getUnicode().a(this.O, 8, (this.O[6] & 255) * 2));
            var12 = var4 + (this.O[6] & 255) * 2;
         } else {
            var5 = this.O[6] & 255;
            var6 = new byte[2 * var5];

            for(var7 = 0; var7 < var5; ++var7) {
               var6[2 * var7] = this.O[8 + var7];
            }

            var11.a(Encoding.getUnicode().a(var6, 0, var6.length));
            var12 = var4 + (this.O[6] & 255);
         }

         if (this.O.length - var12 > 0) {
            byte[] var13 = new byte[this.O.length - var12];
            System.arraycopy(this.O, var12, var13, 0, var13.length);
            var11.b(var13);
         }

         if (var2.a() == 3 && var2.b().size() == 0 && this.O.length == 9) {
            var2.a(4);
         }

         com.aspose.cells.b.a.a.ze.a(var2.b(), (Object)var11);
      }
   }

   private void a(zpb var1, zbqg var2) throws Exception {
      this.a(var1);
      int var3 = com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff';
      int var4 = com.aspose.cells.b.a.zc.e(this.O, 2) & '\uffff';
      if (var3 != 0) {
         zut var5 = var2.b(var4);

         for(int var6 = 0; var6 < var3; ++var6) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 90 && (this.L & '\uffff') != 60) {
               var1.a(-2);
               return;
            }

            this.a(var1);
            int var7 = this.O[1] & 255;
            int var8 = this.O[0] & 255;
            int var9 = com.aspose.cells.b.a.zc.e(this.O, 2) & '\uffff';
            zuq var10 = var5.e(var9);
            int var11 = 4;
            int var12 = -1;

            for(int var13 = var7; var13 <= var8; var12 = var13++) {
               if (var11 >= this.O.length) {
                  this.L = var1.b(this.N);
                  if ((this.L & '\uffff') != 60) {
                     var1.a(-2);
                     break;
                  }

                  this.a(var1);
                  var11 = 0;
               }

               if (this.O[var11] != 2 && var11 + 9 > this.O.length) {
                  byte[] var14 = this.O;
                  this.L = var1.b(this.N);
                  if ((this.L & '\uffff') != 60) {
                     var1.a(-2);
                     break;
                  }

                  this.a(var1);
                  byte[] var15 = this.O;
                  this.O = new byte[this.O.length + var14.length - var11];
                  System.arraycopy(var14, var11, this.O, 0, var14.length - var11);
                  System.arraycopy(var15, var14.length - var11, this.O, 0, var15.length);
                  var11 = 0;
               }

               switch(this.O[var11]) {
               case 0:
                  var11 += 9;
                  break;
               case 1:
                  var10.a(var12, var13, 1, this.O, var11 + 1);
                  var11 += 9;
                  break;
               case 2:
                  var10.a(var12, var13, 2, this.O, var11 + 1);
                  int var16 = com.aspose.cells.b.a.zc.e(this.O, var11 + 1) & '\uffff';
                  if (this.O[var11 + 3] == 0) {
                     var11 += 4 + var16;
                  } else {
                     var11 += 4 + var16 * 2;
                  }
                  break;
               case 4:
                  var10.a(var12, var13, 4, this.O, var11 + 1);
                  var11 += 9;
                  break;
               case 16:
                  var10.a(var12, var13, 3, this.O, var11 + 1);
                  var11 += 9;
                  break;
               default:
                  return;
               }
            }
         }

      }
   }

   private void a(zpb var1, znb var2) throws Exception {
      this.a(var1);
      int var3;
      if (var2 == null) {
         var3 = com.aspose.cells.b.a.zc.a(this.O, 16);
         if (var3 <= 65) {
            this.g.e(com.aspose.cells.b.a.zc.a(this.O, 16));
         }

         if ((this.M & '\uffff') == 40) {
            this.g.j = this.a((byte[])this.O, 24);
         }
      } else {
         var3 = com.aspose.cells.b.a.zc.a(this.O, 16);
         if (var3 <= 65) {
            var2.f(com.aspose.cells.b.a.zc.a(this.O, 16));
         }

         if ((this.M & '\uffff') == 40) {
            var2.r = this.a((byte[])this.O, 24);
         }
      }

   }

   private void p(zpb var1) throws Exception {
      this.a(var1);
      int var2 = com.aspose.cells.b.a.zc.e(this.O, 0);

      for(int var3 = 0; var3 < (var2 & '\uffff'); ++var3) {
         int var4 = com.aspose.cells.b.a.zc.a(this.O, 4 * var3 + 2);
         this.d.m().a(var4, var3 + 8);
      }

   }

   private void q(zpb var1) throws Exception {
      if (this.S != null || this.P != null) {
         int var2;
         byte[] var3;
         if (this.S != null) {
            for(var2 = 0; var2 < this.S.size(); ++var2) {
               var3 = (byte[])((byte[])this.S.get(var2));
               this.b(var3);
            }
         } else {
            this.d.B().a();
         }

         this.S = null;

         for(var2 = 0; var2 < this.P.size(); ++var2) {
            var3 = (byte[])((byte[])this.P.get(var2));
            Style var4 = new Style(this.d);
            var4.a(var3);
            this.d.B().d(var4);
            if (this.U != null && this.U.get(var2) != null) {
               boolean var5 = ((zbvr)this.U.get(var2)).b(var4);
               if (var5 && var2 == 15) {
                  this.d.z().set(0, var4.getFont());
               }
            }
         }

         if (this.R != null) {
            for(var2 = 0; var2 < this.R.size(); ++var2) {
               var3 = (byte[])((byte[])this.R.get(var2));
               this.a(var3);
            }
         }

         this.d.K();
         this.P = null;
      }

      this.a(var1);
      this.j(var1);
   }

   private void a(byte[] var1) {
      int var2 = com.aspose.cells.b.a.zc.e(var1, 0) & '\uffff';
      int var3 = var2 & '耀';
      var2 &= 4095;
      String var4 = "";
      if (var3 == 0) {
         if (var1[2] == 0) {
            return;
         }

         if (var1[4] == 0) {
            byte[] var5 = new byte[2 * var1.length - 10];

            for(int var6 = 0; var6 < var1.length - 5; ++var6) {
               var5[2 * var6] = var1[var6 + 5];
            }

            var4 = Encoding.getUnicode().a(var5);
         } else {
            var4 = Encoding.getUnicode().a(var1, 5, var1.length - 5);
         }
      } else {
         switch(var1[2]) {
         case 0:
            var4 = "Normal";
            break;
         case 1:
            var4 = "RowLevel_" + Byte.toString(var1[3]);
            break;
         case 2:
            var4 = "ColLevel_" + Byte.toString(var1[3]);
            break;
         case 3:
            var4 = "Comma";
            break;
         case 4:
            var4 = "Currency";
            break;
         case 5:
            var4 = "Percent";
            break;
         case 6:
            var4 = "Comma [0]";
            break;
         case 7:
            var4 = "Currency [0]";
            break;
         case 8:
            var4 = "Hyperlink";
            break;
         case 9:
            var4 = "Followed Hyperlink";
         }
      }

      if (var4 != null && !"".equals(var4) && var2 < this.d.B().getCount()) {
         Style var7 = this.d.B().a(var2);
         this.d.r().a(var7);
         var7.a(var4);
      }

   }

   private void r(zpb var1) throws Exception {
      if (this.j) {
         this.a(var1);
         if (this.R == null) {
            this.R = new ArrayList();
         }

         com.aspose.cells.b.a.a.ze.a(this.R, (Object)this.O);

         while(true) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 659) {
               var1.a(-2);
               break;
            }

            this.a(var1);
            com.aspose.cells.b.a.a.ze.a(this.R, (Object)this.O);
         }
      } else {
         this.h(var1);

         while(true) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 659) {
               var1.a(-2);
               break;
            }

            this.h(var1);
         }
      }

   }

   private void s(zpb var1) throws Exception {
      if ((this.a & 64) == 0 && (this.a & 128) == 0) {
         this.h(var1);
         this.L = var1.b(this.N);
         switch(this.L) {
         case 2191:
            this.h(var1);

            while(true) {
               this.L = var1.b(this.N);
               switch(this.L) {
               case 2192:
                  this.h(var1);
                  break;
               default:
                  var1.a(-2);
                  return;
               }
            }
         default:
            var1.a(-2);
         }
      } else {
         this.a(var1);
         TableStyleCollection var2 = this.d.getTableStyles();
         int var3 = com.aspose.cells.b.a.zc.e(this.O, 16) & '\uffff';
         int var4 = com.aspose.cells.b.a.zc.e(this.O, 18) & '\uffff';
         int var5 = 20;
         var2.a(Encoding.getUnicode().a(this.O, var5, var3 * 2));
         if (var2.a() != null) {
            var5 += var3 * 2;
         }

         var2.b(Encoding.getUnicode().a(this.O, var5, var4 * 2));
         this.L = var1.b(this.N);
         switch(this.L) {
         case 2191:
            this.t(var1);
            return;
         default:
            var1.a(-2);
         }
      }
   }

   private void t(zpb var1) throws Exception {
      this.a(var1);
      TableStyle var2 = null;
      int var3 = com.aspose.cells.b.a.zc.e(this.O, 18) & '\uffff';
      byte var4 = 20;
      String var5 = Encoding.getUnicode().a(this.O, var4, var3 * 2);
      int var6 = this.d.getTableStyles().c(var5);
      var2 = this.d.getTableStyles().get(var6);
      var2.a((this.O[12] & 255 & 2) != 0);
      var2.b((this.O[12] & 255 & 4) != 0);
      TableStyleElementCollection var7 = new TableStyleElementCollection(var2);
      var2.a(var7);

      while(true) {
         this.L = var1.b(this.N);
         switch(this.L) {
         case 2192:
            this.a(var2, var1);
            break;
         default:
            var1.a(-2);
            return;
         }
      }
   }

   private void a(TableStyle var1, zpb var2) throws Exception {
      this.a(var2);
      int var3 = com.aspose.cells.b.a.zc.a(this.O, 12);
      int var4 = com.aspose.cells.b.a.zc.a(this.O, 16);
      int var5 = com.aspose.cells.b.a.zc.a(this.O, 20);

      try {
         TableStyleElement var6 = new TableStyleElement(var1.getTableStyleElements(), zcee.F(var3));
         var6.setSize(var4);
         var6.a = var5;
         var1.getTableStyleElements().a(var6);
      } catch (Exception var7) {
         ;
      }

   }

   private void u(zpb var1) throws Exception {
      if (this.S == null) {
         this.S = new ArrayList();
      }

      this.a(var1);
      com.aspose.cells.b.a.a.ze.a(this.S, (Object)this.O);

      while(true) {
         this.L = var1.b(this.N);
         if ((this.L & '\uffff') != 49) {
            var1.a(-2);
            return;
         }

         this.a(var1);
         com.aspose.cells.b.a.a.ze.a(this.S, (Object)this.O);
      }
   }

   private void b(byte[] var1) {
      Font var2 = new Font(this.d, (Object)null, false);
      var2.a(var1);
      if (this.d.z().size() > 3) {
         var2.d(this.d.z().size() + 1);
      } else {
         var2.d(this.d.z().size());
      }

      com.aspose.cells.b.a.a.ze.a(this.d.z(), (Object)var2);
   }

   private void v(zpb var1) throws Exception {
      if ((this.a & 256) == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         this.d.n().getSettings().b(com.aspose.cells.b.a.zc.e(this.O, 0));
         this.d.n().getSettings().c(com.aspose.cells.b.a.zc.e(this.O, 2));
         this.d.n().getSettings().d(com.aspose.cells.b.a.zc.e(this.O, 4));
         this.d.n().getSettings().e(com.aspose.cells.b.a.zc.e(this.O, 6));
         byte var2 = this.O[8];
         byte var3 = (byte)(var2 & 255 & 1);
         this.d.n().getSettings().setHidden(var3 != 0);
         var3 = (byte)(var2 & 255 & 2);
         this.d.n().getSettings().setMinimized(var3 != 0);
         var3 = (byte)(var2 & 255 & 8);
         if (var3 == 0) {
            this.d.n().getSettings().setHScrollBarVisible(false);
         } else {
            this.d.n().getSettings().setHScrollBarVisible(true);
         }

         var3 = (byte)(var2 & 255 & 16);
         if (var3 == 0) {
            this.d.n().getSettings().setVScrollBarVisible(false);
         } else {
            this.d.n().getSettings().setVScrollBarVisible(true);
         }

         var3 = (byte)(var2 & 255 & 32);
         if (var3 == 0) {
            this.d.n().getSettings().setShowTabs(false);
         } else {
            this.d.n().getSettings().setShowTabs(true);
         }

         this.d.c(com.aspose.cells.b.a.zc.e(this.O, 10) & '\uffff');
         this.d.l(com.aspose.cells.b.a.zc.e(this.O, 12));
         this.d.n().getSettings().setSheetTabBarWidth(com.aspose.cells.b.a.zc.e(this.O, 16));
      }
   }

   private void w(zpb var1) throws Exception {
      if (this.a == 0 && !this.i) {
         this.h(var1);
      } else {
         this.a(var1);
         Name var2 = null;
         if (this.d.getNames().getCount() > 0) {
            var2 = this.d.getNames().get(this.d.getNames().getCount() - 1);
            int var3 = com.aspose.cells.b.a.zc.e(this.O, 12) & '\uffff';
            int var4 = com.aspose.cells.b.a.zc.e(this.O, 14) & '\uffff';
            if (var4 != 0) {
               boolean var5 = false;
               int var6;
               if (this.O[16] == 0) {
                  var6 = 17 + var3;
               } else {
                  var6 = 17 + var3 * 2;
               }

               if (this.O[var6] == 0) {
                  var2.setComment(com.aspose.cells.b.a.g.za.getASCII().a(this.O, var6 + 1, var4));
               } else {
                  var2.setComment(Encoding.getUnicode().a(this.O, var6 + 1, var4 * 2));
               }

            }
         }
      }
   }

   private void x(zpb var1) throws Exception {
      if (!this.i && this.a == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         this.g();

         while(true) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 24) {
               var1.a(-2);
               return;
            }

            this.a(var1);
            this.g();
         }
      }
   }

   private void g() {
      Name var1 = new Name(this.d);
      var1.b(this.O);
      this.d.getNames().a(var1, false);
   }

   private void a(zpb var1, HorizontalPageBreakCollection var2) throws Exception {
      this.a(var1);
      int var3 = com.aspose.cells.b.a.zc.e(this.O, 0);

      for(int var4 = 0; var4 < (var3 & '\uffff'); ++var4) {
         int var5 = com.aspose.cells.b.a.zc.e(this.O, 6 * var4 + 2) & '\uffff';
         int var6 = com.aspose.cells.b.a.zc.e(this.O, 6 * var4 + 4) & '\uffff';
         int var7 = com.aspose.cells.b.a.zc.e(this.O, 6 * var4 + 6) & '\uffff';
         if (var7 < var6) {
            int var8 = var6;
            var6 = var7;
            var7 = var8;
         }

         var2.a(var5, var6, var7);
      }

   }

   private void a(zpb var1, VerticalPageBreakCollection var2) throws Exception {
      this.a(var1);
      int var3 = com.aspose.cells.b.a.zc.e(this.O, 0);

      for(int var4 = 0; var4 < (var3 & '\uffff'); ++var4) {
         int var5 = com.aspose.cells.b.a.zc.e(this.O, 6 * var4 + 2) & '\uffff';
         int var6 = com.aspose.cells.b.a.zc.e(this.O, 6 * var4 + 4) & '\uffff';
         int var7 = com.aspose.cells.b.a.zc.e(this.O, 6 * var4 + 6) & '\uffff';
         if (var7 < var6) {
            int var8 = var6;
            var6 = var7;
            var7 = var8;
         }

         var2.a(var6, var7, var5);
      }

   }

   private void y(zpb var1) throws Exception {
      this.a(var1);
      if (this.a(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff')) {
         this.z.a = com.aspose.cells.b.a.zc.b(this.O, 2);
         if (this.c()) {
            this.A.b = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
            if (this.A.b > this.e) {
               this.A.b = 15;
            }

            byte[] var2 = new byte[this.O.length - 20];
            System.arraycopy(this.O, 20, var2, 0, var2.length);
            byte var3 = 0;
            Object var4 = null;
            if ((this.O[12] & 255) == 255 && (this.O[13] & 255) == 255) {
               switch(this.O[6]) {
               case 0:
               case 3:
                  break;
               case 1:
                  var3 = 2;
                  var4 = this.O[8] == 0 ? zml.e : zml.d;
                  break;
               case 2:
                  var3 = 3;
                  var4 = com.aspose.cells.a.c.zi.a(this.O[8]);
                  break;
               default:
                  var3 = 1;
                  var4 = com.aspose.cells.b.a.zc.f(this.O, 6);
               }
            } else {
               var3 = 1;
               var4 = com.aspose.cells.b.a.zc.f(this.O, 6);
            }

            Object var5 = null;

            while(true) {
               this.L = var1.b(this.N);
               switch(this.L) {
               case 519:
                  var3 = 4;
                  var4 = this.c(var1);
                  break;
               case 545:
                  var5 = new zyj(this.p, this.A.a, this.z(var1));
                  ((zyi)var5).b(true);
                  break;
               case 566:
                  var5 = new zyk(this.p, this.A.a, this.A(var1));
                  break;
               case 1212:
                  var5 = new zyj(this.p, this.A.a, this.B(var1));
                  break;
               default:
                  var1.a(-2);
                  if (var5 == null) {
                     var5 = new zyi(this.p, this.A.a);
                  }

                  ((zyi)var5).b = var2;
                  ((zyi)var5).c = var3;
                  ((zyi)var5).d = var4;
                  this.f.b.a((zyi)var5);
                  this.A.c = 5;
                  this.A.d = var5;
                  if (((zyi)var5).a() != null) {
                     if (!((zyi)var5).a().a().b() && (this.i || ((zyi)var5).e())) {
                        this.r.put(this.p << 8 | this.A.a, var5);
                     }
                  } else if (((zyi)var5).b() != null) {
                     if (this.i && !((zyi)var5).b().a.b()) {
                        this.r.put(this.p << 8 | this.A.a, var5);
                     }
                  } else if (var2[0] == 5 && var2[1] == 0 && (var2[2] == 1 || this.i && var2[2] == 2)) {
                     byte var6 = 0;
                     byte var7 = 0;
                     int[] var8 = new int[]{var6};
                     int[] var9 = new int[]{var7};
                     this.f.r().x().a(var2, var8, var9);
                     int var19 = var8[0];
                     int var20 = var9[0];
                     Integer var10 = var19 << 8 | var20;
                     Object var11 = this.r.get(var10);
                     if (var11 == null) {
                        zfv var12 = new zfv();
                        var12.a = (short)var20;
                        if (var19 == this.p) {
                           int var13 = this.x.b(var20);
                           if (var13 > -1) {
                              var12 = this.x.c(var13, var12);
                              if (var12.c == 5) {
                                 var11 = var12.d;
                              }
                           }
                        } else {
                           var12 = this.E.a.a(var19, var12, 4);
                           if (var12 != null && var12.c == 5) {
                              var11 = var12.d;
                           }
                        }
                     }

                     if (var11 != null) {
                        zyi var21 = (zyi)var11;
                        byte var22 = 0;
                        if (var21.a() != null) {
                           zaz var14 = ((zyj)var21).a();
                           ((zyi)var5).b(var14.b());
                           CellArea var15 = var14.a();
                           var22 = 1;
                           if (this.p == var15.EndRow && this.A.a == var15.EndColumn) {
                              this.r.remove(var10);
                           }
                        } else if (var21.b() != null) {
                           var22 = 2;
                           CellArea var23 = ((zyk)var21).b().a;
                           if (this.p == var23.EndRow && this.A.a == var23.EndColumn) {
                              this.r.remove(var10);
                           }
                        }

                        if (this.i && (var22 & 255) > 0) {
                           byte[] var24 = var21.b;
                           int var25 = var21.e;
                           short var16 = var21.f;
                           int var17 = var21.c;
                           Object var18 = var21.d;
                           var21.e = ((zyi)var5).e;
                           var21.f = ((zyi)var5).f;
                           var21.c = ((zyi)var5).c;
                           var21.d = ((zyi)var5).d;
                           var21.b = this.d.x().a().a(var22, this.p, this.A.a);
                           this.A.d = var21;
                           if (this.d()) {
                              this.A.d = var5;
                              this.x.b(this.C, this.A);
                           } else {
                              this.f.b.b(((zyi)var5).a);
                           }

                           var21.b = var24;
                           var21.e = var25;
                           var21.f = var16;
                           var21.c = var17;
                           var21.d = var18;
                           return;
                        }
                     }
                  }

                  if (!this.d()) {
                     this.f.b.b(((zyi)var5).a);
                  }

                  return;
               }
            }
         }
      }
   }

   String c(zpb var1) throws Exception {
      this.a(var1);
      int var2 = com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff';
      boolean var3 = (this.O[2] & 255 & 1) == 0;
      boolean var4 = (this.O[2] & 255 & 4) != 0;
      boolean var5 = (this.O[2] & 255 & 8) != 0;
      int var6 = 3 + (var5 ? 2 : 0) + (var4 ? 4 : 0);
      int var7 = ((this.M & '\uffff') - var6) / (var3 ? 1 : 2);
      String var8 = zco.a(this.O, var6, var3, var7);

      for(var2 -= var7; var2 > 0; var2 -= var7) {
         this.L = var1.b(this.N);
         switch(this.L) {
         case 60:
         case 519:
            this.a(var1);
            var3 = (this.O[0] & 255 & 1) == 0;
            byte var9 = 1;
            var7 = ((this.M & '\uffff') - var9) / (var3 ? 1 : 2);
            var8 = var8 + zco.a(this.O, var9, var3, var7);
            break;
         default:
            var1.a(-2);
            return var8;
         }
      }

      return var8;
   }

   private zaz z(zpb var1) throws Exception {
      this.a(var1);
      CellArea var2 = new CellArea();
      var2.StartRow = com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff';
      var2.EndRow = com.aspose.cells.b.a.zc.e(this.O, 2) & '\uffff';
      var2.StartColumn = this.O[4] & 255;
      var2.EndColumn = this.O[5] & 255;
      byte[] var3 = new byte[(this.M & '\uffff') - 12];
      System.arraycopy(this.O, 12, var3, 0, var3.length);
      return new zaz(var2, true, var3);
   }

   private zaaz A(zpb var1) throws Exception {
      this.a(var1);
      zaaz var2 = new zaaz();
      CellArea var3 = new CellArea();
      var3.StartRow = com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff';
      var3.EndRow = com.aspose.cells.b.a.zc.e(this.O, 2) & '\uffff';
      var3.StartColumn = this.O[4] & 255;
      var3.EndColumn = this.O[5] & 255;
      var2.a = var3;
      var2.a(this.O[6]);
      if (var2.d()) {
         var2.b = com.aspose.cells.b.a.zc.e(this.O, 8) & '\uffff';
         var2.c = com.aspose.cells.b.a.zc.e(this.O, 10) & '\uffff';
         var2.d = com.aspose.cells.b.a.zc.e(this.O, 12) & '\uffff';
         var2.e = com.aspose.cells.b.a.zc.e(this.O, 14) & '\uffff';
      } else if (var2.f()) {
         var2.d = com.aspose.cells.b.a.zc.e(this.O, 8) & '\uffff';
         var2.e = com.aspose.cells.b.a.zc.e(this.O, 10) & '\uffff';
      } else {
         var2.b = com.aspose.cells.b.a.zc.e(this.O, 8) & '\uffff';
         var2.c = com.aspose.cells.b.a.zc.e(this.O, 10) & '\uffff';
      }

      return var2;
   }

   private zaz B(zpb var1) throws Exception {
      this.a(var1);
      CellArea var2 = new CellArea();
      var2.StartRow = com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff';
      var2.EndRow = com.aspose.cells.b.a.zc.e(this.O, 2) & '\uffff';
      var2.StartColumn = this.O[4] & 255;
      var2.EndColumn = this.O[5] & 255;
      byte[] var3 = new byte[(this.M & '\uffff') - 8];
      System.arraycopy(this.O, 8, var3, 0, var3.length);
      return new zaz(var2, false, var3);
   }

   private void C(zpb var1) throws Exception {
      this.a(var1);
      if (this.a(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff')) {
         this.z.a = (short)(this.O[2] & 255);
         if (this.c()) {
            this.A.b = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
            if (this.A.b > this.e) {
               this.A.b = 15;
            }

            byte var2 = this.O[6];
            if (this.O[7] == 0) {
               this.A.c = 2;
               this.A.d = this.O[6] != 0;
            } else {
               this.A.c = 3;
               this.A.d = com.aspose.cells.a.c.zi.a(this.O[6]);
            }

            this.d();
         }
      }
   }

   private void D(zpb var1) throws Exception {
      this.a(var1);
      if (this.a(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff')) {
         this.z.a = (short)(this.O[2] & 255);
         if (this.c()) {
            this.A.b = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
            if (this.A.b > this.e) {
               this.A.b = 15;
            }

            this.d();
         }
      }
   }

   private void E(zpb var1) throws Exception {
      this.a(var1);
      this.d.n().getSettings().setLanguageCode(this.b(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff'));
      this.d.n().getSettings().setRegion(this.b(com.aspose.cells.b.a.zc.e(this.O, 2) & '\uffff'));
   }

   private int b(int var1) {
      switch(var1) {
      case 0:
         return 0;
      case 1:
         return 1;
      case 2:
         return 2;
      case 3:
         return 3;
      case 7:
         return 7;
      case 20:
         return 20;
      case 30:
         return 30;
      case 31:
         return 31;
      case 32:
         return 32;
      case 33:
         return 33;
      case 34:
         return 34;
      case 36:
         return 36;
      case 39:
         return 39;
      case 41:
         return 41;
      case 43:
         return 43;
      case 44:
         return 44;
      case 45:
         return 45;
      case 46:
         return 46;
      case 47:
         return 47;
      case 48:
         return 48;
      case 49:
         return 49;
      case 52:
         return 52;
      case 55:
         return 55;
      case 61:
         return 61;
      case 64:
         return 64;
      case 66:
         return 66;
      case 81:
         return 81;
      case 82:
         return 82;
      case 84:
         return 84;
      case 86:
         return 86;
      case 90:
         return 90;
      case 91:
         return 91;
      case 213:
         return 213;
      case 216:
         return 216;
      case 218:
         return 218;
      case 351:
         return 351;
      case 354:
         return 354;
      case 358:
         return 358;
      case 420:
         return 420;
      case 886:
         return 886;
      case 961:
         return 961;
      case 962:
         return 962;
      case 963:
         return 963;
      case 964:
         return 964;
      case 965:
         return 965;
      case 966:
         return 966;
      case 971:
         return 971;
      case 972:
         return 972;
      case 974:
         return 974;
      case 981:
         return 981;
      default:
         return 0;
      }
   }

   private void a(zpb var1, int[] var2) throws Exception {
      this.a(var1);
      if (this.a(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff')) {
         this.z.a(this.O[2] & 255);
         int var3 = Row.e(this.x);

         for(int var5 = 4; var5 < this.O.length - 2; var5 += 2) {
            if (!this.c()) {
               ++this.z.a;
            } else {
               this.A.b = com.aspose.cells.b.a.zc.e(this.O, var5) & '\uffff';
               if (this.A.b > this.e) {
                  this.A.b = 15;
               }

               boolean var4;
               if (var3 == 15) {
                  var4 = this.A.b == (var2[this.A.a] & '\uffff');
               } else {
                  var4 = var3 == this.A.b;
               }

               this.A.c = 0;
               this.A.d = null;
               this.x.b(this.C, this.A, 6);
               if (this.i) {
                  if (this.h.processCell(new Cell(this.y, this.C, this.A, this.A == this.z))) {
                     if (this.A.a > this.D) {
                        this.D = this.A.a;
                     }
                  } else {
                     this.x.c(this.C, 1);
                  }
               } else if (var4) {
                  this.x.c(this.C, 1);
               }

               ++this.z.a;
            }
         }

         if (!this.i && this.A.a > this.D) {
            this.D = this.A.a;
         }

      }
   }

   private void F(zpb var1) throws Exception {
      this.a(var1);
      byte var2 = this.O[0];
      int var3 = com.aspose.cells.b.a.zc.e(this.O, 2);
      int var4 = var1.b(this.N);
      if ((var4 & '\uffff') != 128) {
         this.f.a(var2);
         this.f.a = (double)(var3 & '\uffff');
      }

      var1.a(-2);
   }

   private void G(zpb var1) throws Exception {
      this.a(var1);
      int var2 = com.aspose.cells.b.a.zc.e(this.O, 0);
      if ((var2 & '\uffff') != 8) {
         int var3 = (var2 & '\uffff') * 8;
         double var4 = 0.0D;
         if (var3 >= 12) {
            var4 = (double)(var3 - 5) / 7.0D;
         } else {
            var4 = (double)var3 / 12.0D;
         }

         this.f.getColumns().a(var4);
      }

      this.L = var1.b(this.N);
      if ((this.L & '\uffff') == 512) {
         this.a(var1);
      } else {
         var1.a(-2);
      }

   }

   private void h() {
      this.n = 0;
      this.o = 0;
      this.y = null;
      this.p = -1;
      this.q = false;
   }

   private boolean c(int var1) {
      if (this.o >= this.n) {
         return false;
      } else {
         this.t = this.k[this.o];
         if (this.t.a == this.p) {
            ++this.o;
            if (this.o == this.n) {
               return false;
            }

            this.t = this.k[this.o];
         }

         if (this.t.a == var1) {
            return true;
         } else if (this.t.a > var1) {
            return false;
         } else {
            this.p = this.t.a;

            do {
               if (!this.i || this.h.startRow(this.p)) {
                  this.e();
                  if (this.i) {
                     this.h.processRow(this.y);
                  } else {
                     this.f();
                  }
               }

               ++this.o;
               if (this.o == this.n) {
                  return false;
               }

               this.t = this.k[this.o];
               this.p = this.t.a;
               if (this.p == var1) {
                  return true;
               }
            } while(this.p <= var1);

            return false;
         }
      }
   }

   private void H(zpb var1) throws Exception {
      if (this.l) {
         this.l = false;
         this.f();
         this.c(Integer.MAX_VALUE);
         this.h();
      } else if (this.n >= this.k.length) {
         this.f();
         this.c(Integer.MAX_VALUE);
         this.h();
      }

      zbbj var2 = new zbbj();
      this.k[this.n++] = var2;
      this.a(var1);
      var2.a = com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff';
      if ((this.O[7] & 255 & 128) == 0) {
         var2.e = (short)Math.min(com.aspose.cells.b.a.zc.b(this.O, 6), 8190);
      } else {
         var2.e = (short)Math.min(com.aspose.cells.b.a.zc.b(this.O, 6) & 32767, 8190);
      }

      var2.b = this.O[12];
      var2.c = this.O[15];
      var2.d = this.O[14] & 255 | (var2.c & 255 & 15) << 8;
      if (var2.d < 15 || var2.d > this.e) {
         var2.d = 15;
      }

      var2.c = (byte)(var2.c & 240);
      byte var3 = var2.e();
      if ((var3 & 255) > (this.f.v() & 255)) {
         this.f.c(var3);
      }

   }

   private void b(zpb var1, int[] var2) throws Exception {
      this.a(var1);
      int var3 = com.aspose.cells.b.a.zc.e(this.O, 0);
      int var4 = com.aspose.cells.b.a.zc.e(this.O, 2);
      int var5;
      if ((var4 & '\uffff') >= 256) {
         this.f.getColumns().a().a(this.O);
         this.f.getColumns().a().a(var3 & '\uffff');

         for(var5 = var3 & '\uffff'; var5 <= 255; ++var5) {
            var2[var5] = this.f.getColumns().a().c();
         }
      } else {
         for(var5 = var3 & '\uffff'; var5 <= (var4 & '\uffff') && var5 <= 255; ++var5) {
            Column var6 = this.f.getColumns().get(var5);
            var6.a(this.O);
            if ((var6.b() & 255) > (this.f.u() & 255)) {
               this.f.b(var6.b());
            }

            var2[var5] = var6.c();
         }
      }

   }

   private void I(zpb var1) throws Exception {
      this.a(var1);
      if (this.a(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff')) {
         this.z.a = (short)(this.O[2] & 255);
         if (this.c()) {
            this.A.b = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
            if (this.A.b > this.e) {
               this.A.b = 15;
            }

            int var2 = com.aspose.cells.b.a.zc.e(this.O, 6) & '\uffff';
            String var3;
            if (var2 > 0) {
               if (this.O[8] == 0) {
                  var3 = zco.a(this.O, 9, var2);
               } else {
                  var3 = Encoding.getUnicode().a(this.O, 9, var2 * 2);
               }
            } else {
               var3 = "";
            }

            this.A.c = 4;
            zayy var4 = this.d.g.a(var3);
            this.A.d = var4;
            if (!this.d()) {
               this.d.g.b(var4);
            }

         }
      }
   }

   private void J(zpb var1) throws Exception {
      this.a(var1);
      if (this.a(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff')) {
         this.z.a = (short)(this.O[2] & 255);
         if (this.c()) {
            this.A.b = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
            if (this.A.b > this.e) {
               this.A.b = 15;
            }

            this.A.c = 1;
            this.A.d = com.aspose.cells.b.a.zc.f(this.O, 6);
            this.d();
         }
      }
   }

   private void K(zpb var1) throws Exception {
      this.a(var1);
      if (this.a(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff')) {
         this.z.a = (short)(this.O[2] & 255);
         if (this.c()) {
            this.A.b = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
            if (this.A.b > this.e) {
               this.A.b = 15;
            }

            this.A.c = 6;
            this.A.d = com.aspose.cells.b.a.zc.a(this.O, 6);
            this.d();
         }
      }
   }

   private void L(zpb var1) throws Exception {
      this.a(var1);
      if (this.a(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff')) {
         this.z.a = com.aspose.cells.b.a.zc.b(this.O, 2);

         for(int var2 = 6; var2 < (this.M & '\uffff'); var2 += 6) {
            if (!this.c()) {
               ++this.z.a;
            } else {
               this.A.c = 6;
               this.A.b = com.aspose.cells.b.a.zc.e(this.O, var2 - 2) & '\uffff';
               if (this.A.b > this.e) {
                  this.A.b = 15;
               }

               this.A.d = com.aspose.cells.b.a.zc.a(this.O, var2);
               this.d();
               ++this.z.a;
            }
         }

      }
   }

   private void M(zpb var1) throws Exception {
      this.a(var1);
      if (this.a(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff')) {
         this.z.a = (short)(this.O[2] & 255);
         if (this.c()) {
            this.A.b = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
            if (this.A.b > this.e) {
               this.A.b = 15;
            }

            this.A.c = 4;
            this.A.d = this.d.g.a(com.aspose.cells.b.a.zc.a(this.O, 6));
            this.d();
         }
      }
   }

   private void N(zpb var1) throws Exception {
      this.a(var1);
      this.g.getHyperlinks().a(this.O);
      this.L = var1.b(this.N);
      if ((this.L & '\uffff') == 2048) {
         this.a(var1);
         if (this.g.getHyperlinks().getCount() != 0) {
            Hyperlink var2 = this.g.getHyperlinks().get(this.g.getHyperlinks().getCount() - 1);
            var2.setScreenTip(Encoding.getUnicode().a(this.O, 10, this.O.length - 12));
         }
      } else {
         var1.a(-2);
      }

   }

   private void O(zpb var1) throws Exception {
      int[] var2 = new int[256];

      int var3;
      for(var3 = 0; var3 < var2.length; ++var3) {
         var2[var3] = 15;
      }

      this.H = new HashMap();
      this.j = this.i || (this.a & 1) != 0;
      this.E = this.f.getRows();
      this.u = this.f.f();
      this.w = new zbaz(1, 32, this.d.g, this.f.b);
      this.x = null;
      this.y = null;
      this.v = null;
      this.n = -1;
      this.o = 0;
      this.p = -1;
      this.q = false;
      this.l = false;
      this.m = true;
      this.r.clear();
      boolean var4 = false;

      label362:
      while(true) {
         this.L = var1.b(this.N);
         double var20;
         int var23;
         switch(this.L) {
         case 6:
         case 1030:
            if (this.j) {
               this.y(var1);
            } else {
               this.h(var1);
            }
            break;
         case 10:
            var1.a(2);
            this.f();
            this.c(Integer.MAX_VALUE);
            this.a(var4);
            return;
         case 12:
            this.a(var1);
            this.d.n().getSettings().setMaxIteration(com.aspose.cells.b.a.zc.e(this.O, 0));
            break;
         case 13:
            this.a(var1);
            switch(com.aspose.cells.b.a.zc.e(this.O, 0)) {
            case 0:
               this.d.n().getSettings().setCalcMode(2);
               continue;
            case 1:
               this.d.n().getSettings().setCalcMode(0);
               continue;
            default:
               this.d.n().getSettings().setCalcMode(1);
               continue;
            }
         case 15:
            this.a(var1);
            this.d.n().getSettings().a((com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff') == 0);
            break;
         case 16:
            this.a(var1);
            this.d.n().getSettings().setMaxChange(com.aspose.cells.b.a.zc.f(this.O, 0));
            break;
         case 17:
            this.a(var1);
            this.d.n().getSettings().setIteration(this.O[0] == 1);
            break;
         case 18:
            this.a(var1);
            this.g.getProtection().setAllowEditingContent(this.O[0] == 0);
            break;
         case 19:
            this.a(var1);
            this.g.getProtection().a(com.aspose.cells.b.a.zc.e(this.O, 0));
            break;
         case 20:
            this.a(var1);
            if (this.O != null && this.O.length != 0) {
               this.f.i().c(this.O);
            }
            break;
         case 21:
            this.a(var1);
            if (this.O != null && this.O.length != 0) {
               this.f.i().d(this.O);
            }
            break;
         case 26:
            this.a(var1, this.g.getVerticalPageBreaks());
            break;
         case 27:
            this.a(var1, this.g.getHorizontalPageBreaks());
            break;
         case 28:
            this.Y(var1);
            break;
         case 29:
            if (this.g.s() == null) {
               this.g.a(new zbcj(this.g));
            }

            this.a(var1, this.g.s());
            break;
         case 38:
            this.a(var1);
            var20 = com.aspose.cells.b.a.zc.f(this.O, 0);
            if (var20 < 0.0D || var20 > 49.0D) {
               var20 = 0.0D;
            }

            this.f.i().setLeftMarginInch(var20);
            break;
         case 39:
            this.a(var1);
            var20 = com.aspose.cells.b.a.zc.f(this.O, 0);
            if (var20 < 0.0D || var20 > 49.0D) {
               var20 = 0.0D;
            }

            this.f.i().setRightMarginInch(var20);
            break;
         case 40:
            this.a(var1);
            var20 = com.aspose.cells.b.a.zc.f(this.O, 0);
            if (var20 < 0.0D || var20 > 49.0D) {
               var20 = 0.0D;
            }

            this.f.i().setTopMarginInch(var20);
            break;
         case 41:
            this.a(var1);
            var20 = com.aspose.cells.b.a.zc.f(this.O, 0);
            if (var20 < 0.0D || var20 > 49.0D) {
               var20 = 0.0D;
            }

            this.f.i().setBottomMarginInch(var20);
            break;
         case 42:
            this.a(var1);
            if (this.O[0] == 0 && this.O[1] == 0) {
               this.f.i().setPrintHeadings(false);
               break;
            }

            this.f.i().setPrintHeadings(true);
            break;
         case 43:
            this.a(var1);
            if (this.O[0] == 0 && this.O[1] == 0) {
               this.f.i().setPrintGridlines(false);
               break;
            }

            this.f.i().setPrintGridlines(true);
            break;
         case 60:
            this.h(var1);
            break;
         case 65:
            this.a(var1, this.g.b());
            break;
         case 77:
            this.M = var1.b(this.N);
            int var5 = var1.b(this.N) & '\uffff';
            if (var5 != 0) {
               var1.a((this.M & '\uffff') - 2);
               break;
            } else {
               byte[] var6 = new byte[(this.M & '\uffff') - 2];
               var1.a(var6);
               ArrayList var7 = new ArrayList();
               com.aspose.cells.b.a.a.ze.a(var7, (Object)var6);
               int var8 = var6.length;

               while(true) {
                  while(true) {
                     this.L = var1.b(this.N);
                     if ((this.L & '\uffff') == 77) {
                        this.M = var1.b(this.N);
                        var5 = var1.b(this.N) & '\uffff';
                        var6 = new byte[(this.M & '\uffff') - 2];
                        var1.a(var6);
                        com.aspose.cells.b.a.a.ze.a(var7, (Object)var6);
                        var8 += var6.length;
                     } else {
                        if ((this.L & '\uffff') != 60) {
                           var1.a(-2);
                           byte[] var9 = new byte[var8];
                           var8 = 0;

                           for(int var21 = 0; var21 < var7.size(); ++var21) {
                              var6 = (byte[])((byte[])var7.get(var21));
                              System.arraycopy(var6, 0, var9, var8, var6.length);
                              var8 += var6.length;
                           }

                           this.g.getCells().i().a(var9);
                           continue label362;
                        }

                        this.a(var1);
                        com.aspose.cells.b.a.a.ze.a(var7, (Object)this.O);
                        var8 += this.M & '\uffff';
                     }
                  }
               }
            }
         case 85:
            this.F = null;
            this.G(var1);
            break;
         case 95:
            this.a(var1);
            this.d.n().getSettings().setRecalculateBeforeSave(this.O[0] == 1);
            break;
         case 99:
            this.a(var1);
            this.g.getProtection().setAllowEditingObject(this.O[0] == 0);
            break;
         case 125:
            this.F = null;
            this.b(var1, var2);
            break;
         case 129:
            this.a(var1);
            this.g.f = com.aspose.cells.b.a.zc.b(this.O, 0);
            if ((this.g.f & 256) == 0) {
               this.f.i().setPercentScale(true);
            } else {
               this.f.i().setPercentScale(false);
            }

            if ((this.g.f & 64) == 0) {
               this.g.getOutline().SummaryRowBelow = false;
            }

            if ((this.g.f & 128) == 0) {
               this.g.getOutline().SummaryColumnRight = false;
            }
            break;
         case 131:
            this.a(var1);
            if (this.O[0] == 0 && this.O[1] == 0) {
               this.f.i().setCenterHorizontally(false);
               break;
            }

            this.f.i().setCenterHorizontally(true);
            break;
         case 132:
            this.a(var1);
            if (this.O[0] == 0 && this.O[1] == 0) {
               this.f.i().setCenterVertically(false);
               break;
            }

            this.f.i().setCenterVertically(true);
            break;
         case 144:
            this.a(var1);
            this.g.a(new zbnq());
            this.g.r().b(this.O);
            break;
         case 153:
            this.F = null;
            this.a(var1);
            var3 = com.aspose.cells.b.a.zc.e(this.O, 0);
            double var10 = 0.0D;
            if (256 + this.d.H() > (var3 & '\uffff')) {
               var10 = (double)(var3 & '\uffff') / (256.0D + (double)this.d.H());
            } else {
               var10 = (double)((var3 & '\uffff') - this.d.H()) / 256.0D;
            }

            if (var10 < 0.0D) {
               var10 = 0.0D;
            }

            this.f.a(var10);
            break;
         case 155:
            var1.a(2);
            break;
         case 157:
            this.a(var1);
            Name var12 = this.d.getNames().a("_FILTERDATABASE", this.g.getIndex());
            if (var12 != null) {
               this.g.getAutoFilter().a(var12);
            }
            break;
         case 158:
            this.a(var1);
            this.a(0, (AutoFilter)this.g.getAutoFilter());
            break;
         case 160:
            this.a(var1);
            var4 = true;
            int var13 = com.aspose.cells.b.a.zc.e(this.O, 0);
            int var14 = com.aspose.cells.b.a.zc.e(this.O, 2);
            this.g.setZoom((var13 & '\uffff') * 100 / (var14 & '\uffff'));
            break;
         case 161:
            this.a(var1);
            this.f.i().b(this.O);
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') == 2204) {
               this.a((PageSetup)this.f.i(), (zpb)var1, (byte[])null);
            } else {
               var1.a(-2);
            }
            break;
         case 174:
            this.R(var1);
            break;
         case 176:
            this.ab(var1);
            break;
         case 189:
            if (this.j) {
               this.L(var1);
            } else {
               this.h(var1);
            }
            break;
         case 190:
            if (this.j) {
               this.a(var1, var2);
            } else {
               this.h(var1);
            }
            break;
         case 215:
            this.d.n().l();
            this.f();
            this.c(Integer.MAX_VALUE);
            this.h();
            this.h(var1);
            break;
         case 221:
            this.a(var1);
            this.g.getProtection().setAllowEditingScenario(this.O[0] == 0);
            break;
         case 229:
            this.aj(var1);
            break;
         case 233:
            this.Z(var1);
            break;
         case 236:
            if ((this.a & 4) != 0) {
               if (this.F == null) {
                  this.F = new zkx(this.f, 255);
               } else {
                  this.f.c = this.F;
               }

               if (this.G == null) {
                  this.f.getRows().b(0);
                  this.G = this.f.getRows().b;
               } else {
                  this.f.getRows().b = this.G;
               }

               zans var22 = new zans(this, var1, this.d, this.g, this.g);
               var22.b();
               this.f.l();
               this.f.getRows().b();
            } else {
               this.Q(var1);
            }
            break;
         case 239:
            this.P(var1);
            break;
         case 253:
            if (this.j) {
               this.M(var1);
            } else {
               this.h(var1);
            }
            break;
         case 426:
            this.af(var1);
            break;
         case 429:
            this.ac(var1);
            break;
         case 432:
            this.ai(var1);
            break;
         case 434:
            boolean var15 = (this.a & 32) != 0;
            this.a(var1);
            if (var15) {
               this.g.getValidations().a(this.O);
            }

            int var16 = com.aspose.cells.b.a.zc.a(this.O, 14);
            var23 = 0;

            while(true) {
               if (var23 >= var16) {
                  continue label362;
               }

               var1.a(2);
               if (var15) {
                  this.a(var1);
                  znj var18 = new znj(this.g);
                  Validation var19 = var18.a(this.O);
                  if (var19 != null) {
                     this.g.getValidations().a(var19);
                  }
               } else {
                  this.h(var1);
               }

               ++var23;
            }
         case 440:
            this.N(var1);
            break;
         case 442:
            this.aa(var1);
            break;
         case 513:
            if (this.j) {
               this.D(var1);
            } else {
               this.h(var1);
            }
            break;
         case 515:
            if (this.j) {
               this.J(var1);
            } else {
               this.h(var1);
            }
            break;
         case 516:
            if (this.j) {
               this.I(var1);
            } else {
               this.h(var1);
            }
            break;
         case 517:
            if (this.j) {
               this.C(var1);
            } else {
               this.h(var1);
            }
            break;
         case 520:
            this.G = null;
            if (this.j && this.n < 0) {
               if (this.i && !this.h.startSheet(this.g)) {
                  this.j = false;
               }

               this.n = 0;
            }

            if (this.j) {
               this.H(var1);
            } else {
               this.h(var1);
            }
            break;
         case 549:
            this.F = null;
            this.F(var1);
            break;
         case 574:
            this.ad(var1);
            break;
         case 638:
            if (this.j) {
               this.K(var1);
            } else {
               this.h(var1);
            }
            break;
         case 1048:
            this.W(var1);
            break;
         case 2146:
            this.a((zpb)var1, (znb)null);
            break;
         case 2150:
            this.a(var1, this.g.getPageSetup());
            break;
         case 2151:
            this.a(var1);
            if (this.O[12] == 2) {
               this.g.getProtection().a(this.O);
            }
            break;
         case 2152:
            this.a(var1);
            if (this.O[12] == 2) {
               this.j();
            } else if (this.O[12] == 3) {
               this.i();
            }
            break;
         case 2161:
            this.a(var1);
            if (this.O[12] == 5) {
               var23 = com.aspose.cells.b.a.zc.a(this.O, 23);
               if (var23 > this.d.j) {
                  this.d.j = var23;
               }

               this.U(var1);
            } else {
               if (this.g.A() == null) {
                  this.g.c(new ArrayList());
               }

               byte[] var24 = new byte[(this.M & '\uffff') + 4];
               System.arraycopy(com.aspose.cells.b.a.zc.a(this.L), 0, var24, 0, 2);
               System.arraycopy(com.aspose.cells.b.a.zc.a(this.M), 2, var24, 0, 2);
               System.arraycopy(this.O, 0, var24, 4, this.O.length);
               com.aspose.cells.b.a.a.ze.a(this.g.A(), (Object)var24);
            }
            break;
         case 2162:
            this.T(var1);
            break;
         case 2165:
            if ((this.a & 128) != 0) {
               if (this.g.A() == null) {
                  this.g.c(new ArrayList());
               }

               this.a(var1, this.L & '\uffff');
               com.aspose.cells.b.a.a.ze.a(this.g.A(), (Object)this.O);
            } else {
               this.h(var1);
            }
            break;
         case 2167:
            this.S(var1);
            break;
         case 2169:
            this.ag(var1);
            break;
         case 2171:
            this.ah(var1);
            break;
         case 2174:
            this.X(var1);
            break;
         case 2187:
            this.b(var1, (znb)null);
            break;
         case 2197:
            this.a(var1);
            DataSorter var17 = null;
            switch((this.O[12] & 255) >> 3 & 7) {
            case 2:
               var17 = this.g.getAutoFilter().getSorter();
            default:
               if (var17 != null) {
                  this.a(var17, var1);
               }
               continue;
            }
         default:
            this.M = var1.b(this.N);
            var1.a(this.M & '\uffff');
         }
      }
   }

   private void P(zpb var1) throws Exception {
      this.a(var1);
      byte var2 = 4;
      int var3 = com.aspose.cells.b.a.zc.e(this.O, var2) & '\uffff';
      int var10 = var2 + 2;
      CellArea var4 = new CellArea();
      if (var3 != 0) {
         label63:
         for(int var5 = 0; var5 < var3; ++var5) {
            int var7;
            if (var10 + 8 > (this.M & '\uffff')) {
               if (var10 != (this.M & '\uffff')) {
                  byte[] var11 = new byte[8];
                  var7 = (this.M & '\uffff') - var10;
                  System.arraycopy(this.O, var10, var11, 0, var7);
                  this.L = var1.b(this.N);
                  if ((this.L & '\uffff') != 60) {
                     var1.a(-2);
                     return;
                  }

                  this.a(var1);
                  System.arraycopy(this.O, 0, var11, var7, 8 - var7);
                  var10 = 8 - var7;
                  var4.StartRow = com.aspose.cells.b.a.zc.e(var11, 0) & '\uffff';
                  var4.EndRow = com.aspose.cells.b.a.zc.e(var11, 2) & '\uffff';
                  var4.StartColumn = com.aspose.cells.b.a.zc.b(var11, 4);
                  var4.EndColumn = com.aspose.cells.b.a.zc.b(var11, 6);
                  int var8 = var4.StartRow;

                  while(true) {
                     if (var8 > var4.EndRow) {
                        continue label63;
                     }

                     for(int var9 = var4.StartColumn; var9 <= var4.EndColumn; ++var9) {
                        this.f.get(var8, var9).a(true);
                     }

                     ++var8;
                  }
               }

               this.L = var1.b(this.N);
               if ((this.L & '\uffff') != 60) {
                  var1.a(-2);
                  return;
               }

               this.a(var1);
               var10 = 0;
            }

            var4.StartRow = com.aspose.cells.b.a.zc.e(this.O, var10) & '\uffff';
            var4.EndRow = com.aspose.cells.b.a.zc.e(this.O, var10 + 2) & '\uffff';
            var4.StartColumn = com.aspose.cells.b.a.zc.b(this.O, var10 + 4);
            var4.EndColumn = com.aspose.cells.b.a.zc.b(this.O, var10 + 6);

            for(int var6 = var4.StartRow; var6 <= var4.EndRow; ++var6) {
               for(var7 = var4.StartColumn; var7 <= var4.EndColumn; ++var7) {
                  this.f.get(var6, var7).a(true);
               }
            }

            var10 += 8;
         }
      }

   }

   private void Q(zpb var1) throws Exception {
      this.M = var1.b(this.N);
      var1.a(this.M & '\uffff');
      this.L = var1.b(this.N);
      if ((this.L & '\uffff') != 93) {
         var1.a(-2);
      } else {
         this.a(var1);
         if (this.O[4] == 5) {
            this.d(var1);
         }
      }
   }

   void d(zpb var1) throws Exception {
      this.L = var1.b(this.N);
      if ((this.L & '\uffff') != 2057) {
         this.M = var1.b(this.N);
         var1.a(this.M & '\uffff');
      } else {
         var1.a(18);

         while(true) {
            this.L = var1.b(this.N);
            switch(this.L) {
            case 10:
               var1.a(2);
               return;
            default:
               this.M = var1.b(this.N);
               var1.a(this.M & '\uffff');
            }
         }
      }
   }

   private void R(zpb var1) throws Exception {
      this.a(var1);
      int var2 = com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff';
      ScenarioCollection var3 = this.f.h().getScenarios();
      var3.b = com.aspose.cells.b.a.zc.e(this.O, 2) & '\uffff';
      var3.c = com.aspose.cells.b.a.zc.e(this.O, 4) & '\uffff';
      int var4 = com.aspose.cells.b.a.zc.e(this.O, 6) & '\uffff';
      int var6;
      if (var4 > 0) {
         var3.d = new ArrayList();
         int var5 = 8;

         for(var6 = 0; var6 < var4; ++var6) {
            CellArea var7 = new CellArea();
            var7.StartRow = com.aspose.cells.b.a.zc.e(this.O, var5) & '\uffff';
            var7.EndRow = com.aspose.cells.b.a.zc.e(this.O, var5 + 2) & '\uffff';
            var7.StartColumn = com.aspose.cells.b.a.zc.b(this.O, var5 + 4);
            var7.EndColumn = com.aspose.cells.b.a.zc.b(this.O, var5 + 6);
            var5 += 8;
            com.aspose.cells.b.a.a.ze.a(var3.d, (Object)var7);
         }
      }

      for(; var2 > 0; --var2) {
         this.L = var1.b(this.N);
         switch(this.L) {
         case 60:
         case 175:
            this.a(var1);
            Scenario var18 = new Scenario();
            var3.a(var18);
            byte var19 = 0;
            int var20 = com.aspose.cells.b.a.zc.e(this.O, var19) & '\uffff';
            var6 = var19 + 2;
            var18.setLocked(this.O[var6] != 0);
            var18.setHidden(this.O[var6 + 1] != 0);
            var6 += 2;
            int var8 = this.O[var6] & 255;
            int var9 = this.O[var6 + 1] & 255;
            int var10 = this.O[var6 + 2] & 255;
            var6 += 3;
            boolean var11 = this.O[var6] == 0;
            var18.b = zco.a(this.O, var6 + 1, var11, var8);
            var6 += var18.b.length() + (var11 ? 0 : var18.b.length()) + 1;
            if (var10 != 0) {
               var11 = this.O[var6 + 2] == 0;
               var18.c = zco.a(this.O, var6);
               var6 += var18.getUser().length() + (var11 ? 0 : var18.getUser().length()) + 3;
            }

            if (var9 != 0) {
               var11 = this.O[var6 + 2] == 0;
               var18.a = zco.a(this.O, var6);
               var6 += var18.getComment().length() + (var11 ? 0 : var18.getComment().length()) + 3;
            }

            int var12;
            for(var12 = 0; var12 < var20; ++var12) {
               ScenarioInputCell var13 = new ScenarioInputCell();
               var18.getInputCells().a(var13);
               var13.a = com.aspose.cells.b.a.zc.e(this.O, var6) & '\uffff';
               var13.b = com.aspose.cells.b.a.zc.b(this.O, var6 + 2);
               var6 += 4;
            }

            boolean var22 = false;

            boolean var21;
            for(int var23 = 0; var23 < var20; ++var23) {
               ScenarioInputCell var14 = var18.getInputCells().get(var23);
               if (var6 >= (this.M & '\uffff')) {
                  this.L = var1.b(this.N);
                  if ((this.L & '\uffff') != 60 && (this.L & '\uffff') != 175) {
                     var1.a(-2);
                     return;
                  }

                  this.a(var1);
                  var6 = 0;
               }

               int var15;
               if (var6 + 3 > (this.M & '\uffff')) {
                  var15 = (this.M & '\uffff') - var6;
                  byte[] var16 = new byte[3];
                  System.arraycopy(this.O, var6, var16, 0, var15);
                  this.L = var1.b(this.N);
                  if ((this.L & '\uffff') != 60 && (this.L & '\uffff') != 175) {
                     var1.a(-2);
                     return;
                  }

                  this.a(var1);
                  var21 = false;
                  System.arraycopy(this.O, 0, var16, var15, 3 - var15);
                  var6 = 3 - var15;
                  var12 = com.aspose.cells.b.a.zc.e(var16, 0) & '\uffff';
                  var11 = var16[2] == 0;
                  var14.c = zco.a(this.O, var6, var11, var12);
                  var6 += var14.c.length() + (var11 ? 0 : var14.c.length());
               } else {
                  var12 = com.aspose.cells.b.a.zc.e(this.O, var6) & '\uffff';
                  var11 = this.O[var6 + 2] == 0;
                  var15 = var12 + 3 + (var11 ? 0 : var12);
                  if (var6 + var15 > (this.M & '\uffff')) {
                     int var24 = (this.M & '\uffff') - var6;
                     byte[] var17 = new byte[var15];
                     System.arraycopy(this.O, var6, var17, 0, var24);
                     this.L = var1.b(this.N);
                     if ((this.L & '\uffff') != 60 && (this.L & '\uffff') != 175) {
                        var1.a(-2);
                        return;
                     }

                     this.a(var1);
                     var21 = false;
                     System.arraycopy(this.O, 0, var17, var24, var15 - var24);
                     var6 = var15 - var24;
                     var14.c = zco.a(var17, 3, var11, var12);
                  } else {
                     var14.c = zco.a(this.O, var6 + 3, var11, var12);
                     var6 += var15;
                  }
               }
            }

            if (var6 + var20 * 2 < (this.M & '\uffff')) {
               if ((this.L & '\uffff') != 60 && (this.L & '\uffff') != 175) {
                  var1.a(-2);
                  return;
               }

               this.a(var1);
               var21 = false;
            }
            break;
         default:
            var1.a(-2);
            return;
         }
      }

   }

   private void a(ShapeCollection var1) {
      if (var1 != null && var1.getCount() > 0) {
         if (this.F == null) {
            this.F = new zkx(this.f, 255);
         } else {
            this.f.c = this.F;
         }

         if (this.G == null) {
            this.f.getRows().b(0);
            this.G = this.f.getRows().b;
         } else {
            this.f.getRows().b = this.G;
         }

         for(int var2 = 0; var2 < var1.getCount(); ++var2) {
            Shape var3 = var1.get(var2);
            if (var3.N().h().c != null) {
               int var4 = var3.N().h().a();
               double var5 = 0.0D;
               double var7 = 0.0D;
               if (var3.isGroup() && !var3.S()) {
                  var5 = var3.N().h().c.j;
                  var7 = var3.N().h().c.k;
               }

               if (!var3.P() && !var3.S()) {
                  var3.a(var4, 0, 0, 0, 0, 0, 0, 0, 0);
               }

               if (var5 != 0.0D && var7 != 0.0D) {
                  var3.setWidth((int)((double)var3.getWidth() * var5 + 0.5D));
                  var3.setHeight((int)((double)var3.getHeight() * var7 + 0.5D));
               }

               if (var4 != 2) {
                  var3.setPlacement(var4);
               }

               if (var3.getMsoDrawingType() == 5) {
                  Chart var9 = ((ChartShape)var3).a();
                  this.a(var9.l());
               }
            }
         }

         this.f.l();
         this.f.getRows().b();
      }

   }

   private void a(boolean var1) {
      if (this.g.t() != null && this.g.getShapes().getCount() == 0) {
         this.g.h = null;
      }

      this.a(this.g.t());
      if (!var1) {
         switch(this.g.getViewType()) {
         case 0:
            this.g.setZoom(100);
            break;
         case 1:
            this.g.setZoom(100);
         case 2:
         }
      }

   }

   private void b(zpb var1, znb var2) throws Exception {
      this.a(var1);
      if (var2 == null) {
         if (this.g.u() != null) {
            int var3 = com.aspose.cells.b.a.zc.e(this.O, 12) & '\uffff';
            if (var3 >= 10 && var3 <= 400) {
               this.g.u()[2] = var3;
            }
         }

         if ((this.O[14] & 255 & 1) != 0) {
            this.g.setViewType(2);
         }

         this.g.setRulerVisible((this.O[14] & 255 & 2) != 0);
      } else {
         if (var2.C() != null) {
            var2.C()[2] = com.aspose.cells.b.a.zc.e(this.O, 12) & '\uffff';
         }

         if ((this.O[14] & 255 & 1) != 0) {
            var2.d(2);
         }

         var2.s((this.O[14] & 255 & 2) != 0);
      }

   }

   private void i() {
      int var1 = this.g.getErrorCheckOptions().add();
      ErrorCheckOption var2 = this.g.getErrorCheckOptions().get(var1);
      byte var3 = 19;
      int var4 = com.aspose.cells.b.a.zc.e(this.O, var3) & '\uffff';
      int var7 = var3 + 8;

      for(int var5 = 0; var5 < var4; ++var5) {
         CellArea var6 = new CellArea();
         var6.StartRow = com.aspose.cells.b.a.zc.e(this.O, var7) & '\uffff';
         var6.EndRow = com.aspose.cells.b.a.zc.e(this.O, var7 + 2) & '\uffff';
         var6.StartColumn = com.aspose.cells.b.a.zc.b(this.O, var7 + 4);
         var6.EndColumn = com.aspose.cells.b.a.zc.b(this.O, var7 + 6);
         var2.addRange(var6);
         var7 += 8;
      }

      var2.b = com.aspose.cells.b.a.zc.a(this.O, var7);
      var7 += 4;
   }

   private void j() throws Exception {
      ProtectedRange var1 = new ProtectedRange(this.g.getAllowEditRanges());
      byte var2 = 19;
      int var3 = com.aspose.cells.b.a.zc.e(this.O, var2) & '\uffff';
      int var7 = var2 + 8;

      for(int var4 = 0; var4 < var3; ++var4) {
         CellArea var5 = new CellArea();
         var5.StartRow = com.aspose.cells.b.a.zc.e(this.O, var7) & '\uffff';
         var5.EndRow = com.aspose.cells.b.a.zc.e(this.O, var7 + 2) & '\uffff';
         var5.StartColumn = com.aspose.cells.b.a.zc.e(this.O, var7 + 4) & '\uffff';
         var5.EndColumn = com.aspose.cells.b.a.zc.e(this.O, var7 + 6) & '\uffff';
         var1.a(var5);
         var7 += 8;
      }

      boolean var8 = (this.O[var7] & 255 & 1) != 0;
      var7 += 4;
      if (var7 + 4 <= (this.M & '\uffff')) {
         var1.a(com.aspose.cells.b.a.zc.e(this.O, var7));
         var7 += 4;
         int[] var9 = new int[]{var7};
         var1.setName(a(this.O, var9));
         var7 = var9[0];
         if (var8) {
            int var6 = com.aspose.cells.b.a.zc.a(this.O, var7);
            var1.a = new byte[var6 + 4];
            System.arraycopy(this.O, var7, var1.a, 0, var6 + 4);
         }

         this.g.getAllowEditRanges().a(var1);
      }
   }

   private void S(zpb var1) throws Exception {
      if ((this.a & 128) == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         short var2 = com.aspose.cells.b.a.zc.b(this.O, 12);
         int var3 = com.aspose.cells.b.a.zc.a(this.O, 14);
         ListObject var4 = this.g.getListObjects().a(var3);
         if (var4 != null) {
            byte var5 = 18;
            int var15;
            if (var2 == 0) {
               int var6 = com.aspose.cells.b.a.zc.a(this.O, 18);
               int var7 = com.aspose.cells.b.a.zc.a(this.O, 22);
               int var8 = com.aspose.cells.b.a.zc.a(this.O, 26);
               int var9 = com.aspose.cells.b.a.zc.a(this.O, 30);
               int var10 = com.aspose.cells.b.a.zc.a(this.O, 34);
               int var11 = com.aspose.cells.b.a.zc.a(this.O, 38);
               int var12 = com.aspose.cells.b.a.zc.a(this.O, 42);
               int var13 = com.aspose.cells.b.a.zc.a(this.O, 46);
               int var14 = com.aspose.cells.b.a.zc.a(this.O, 50);
               var15 = 54;
               if (var6 != 0) {
                  var15 = this.a(var15, var4.v(), var6);
               }

               if (var8 != 0) {
                  var15 = this.a(var15, var4.w(), var8);
               }

               if (var10 != 0) {
                  this.a(var15, var4.x(), var10);
               }
            } else if (var2 == 1) {
               byte var16 = this.O[18];
               var4.setShowTableStyleFirstColumn((var16 & 255 & 1) != 0);
               var4.setShowTableStyleLastColumn((var16 & 255 & 2) != 0);
               var4.setShowTableStyleRowStripes((var16 & 255 & 4) != 0);
               var4.setShowTableStyleColumnStripes((var16 & 255 & 8) != 0);
               var15 = var5 + 2;
               int[] var18 = new int[]{var15};
               var4.setTableStyleName(a(this.O, var18));
               var15 = var18[0];
            } else if (var2 == 2) {
               int[] var17 = new int[]{var5};
               var4.setDisplayName(a(this.O, var17));
               var15 = var17[0];
               var17[0] = var15;
               var4.c(a(this.O, var17));
               var15 = var17[0];
            }

         }
      }
   }

   private void T(zpb var1) throws Exception {
      if ((this.a & 128) == 0) {
         this.h(var1);
      } else {
         this.O = this.V(var1);
         ListObject var2 = new ListObject(this.g.getListObjects());
         this.g.getListObjects().a(var2);
         if (this.O[12] != 5) {
            var2.b = this.O;
         } else {
            int var3 = com.aspose.cells.b.a.zc.e(this.O, 19) & '\uffff';
            int var4 = com.aspose.cells.b.a.zc.a(this.O, 21);
            int var5 = 27;
            ArrayList var6 = new ArrayList();

            for(int var7 = 0; var7 < var3; ++var7) {
               CellArea var8 = new CellArea();
               var8.StartRow = com.aspose.cells.b.a.zc.e(this.O, var5) & '\uffff';
               var8.EndRow = com.aspose.cells.b.a.zc.e(this.O, var5 + 2) & '\uffff';
               var8.StartColumn = com.aspose.cells.b.a.zc.e(this.O, var5 + 4) & '\uffff';
               var8.EndColumn = com.aspose.cells.b.a.zc.e(this.O, var5 + 6) & '\uffff';
               var5 += 8;
               com.aspose.cells.b.a.a.ze.a(var6, (Object)var8);
            }

            CellArea var24 = (CellArea)var6.get(0);
            var2.a(var24.StartRow);
            var2.c(var24.EndRow);
            var2.b(var24.StartColumn);
            var2.d(var24.EndColumn);
            switch(this.O[var5]) {
            case 1:
               var2.c = 1;
               break;
            case 2:
               var2.c = 2;
               break;
            case 3:
               var2.c = 3;
               break;
            default:
               var2.c = 0;
            }

            if (var2.getDataSourceType() != 0) {
               var2.b = this.O;
            } else {
               var2.k(com.aspose.cells.b.a.zc.a(this.O, var5 + 4));
               var2.a(com.aspose.cells.b.a.zc.d(this.O, var5 + 28));
               if ((var2.h() & 4294967295L & 2L) != 0L) {
                  var2.r().setRange(var2.z());
               }

               var2.f(com.aspose.cells.b.a.zc.a(this.O, var5 + 32));
               var2.g(com.aspose.cells.b.a.zc.a(this.O, var5 + 36));
               var2.h(com.aspose.cells.b.a.zc.a(this.O, var5 + 40));
               var2.i(com.aspose.cells.b.a.zc.a(this.O, var5 + 44));
               var2.a(new byte[16]);
               System.arraycopy(this.O, var5 + 48, var2.p(), 0, 16);
               var5 += 64;
               int[] var25 = new int[]{var5};
               var2.d(a(this.O, var25));
               var5 = var25[0];
               int var26 = com.aspose.cells.b.a.zc.e(this.O, var5) & '\uffff';
               var5 += 2;
               int[] var9;
               if (var2.l()) {
                  var9 = new int[]{var5};
                  var2.a(a(this.O, var9));
                  var5 = var9[0];
               }

               if (var2.m()) {
                  var9 = new int[]{var5};
                  var2.b(a(this.O, var9));
                  var5 = var9[0];
               }

               for(int var27 = 0; var27 < var26; ++var27) {
                  ListColumn var10 = new ListColumn(var2.getListColumns());
                  var2.getListColumns().a(var10);
                  var10.o = com.aspose.cells.b.a.zc.a(this.O, var5);
                  var10.n = com.aspose.cells.b.a.zc.a(this.O, var5 + 4);
                  var10.h = com.aspose.cells.b.a.zc.a(this.O, var5 + 8);
                  var10.a(this.O[var5 + 12] & 255);
                  int var11 = com.aspose.cells.b.a.zc.a(this.O, var5 + 16);
                  com.aspose.cells.b.a.zc.a(this.O, var5 + 20);
                  long var13 = com.aspose.cells.b.a.zc.d(this.O, var5 + 24);
                  var10.p = var13;
                  int var15 = com.aspose.cells.b.a.zc.a(this.O, var5 + 28);
                  com.aspose.cells.b.a.zc.a(this.O, var5 + 32);
                  var5 += 36;
                  int[] var17 = new int[]{var5};
                  var10.a(a(this.O, var17));
                  var5 = var17[0];
                  if (!var2.k()) {
                     var17 = new int[]{var5};
                     var10.b(a(this.O, var17));
                     var5 = var17[0];
                  }

                  if (var11 > 0) {
                     var5 = this.a(var5, var10.m(), var11);
                  }

                  if (var15 > 0) {
                     var5 = this.a(var5, var10.l(), var15);
                  }

                  int var28;
                  if ((var13 & 4294967295L & 1L) != 0L) {
                     var28 = com.aspose.cells.b.a.zc.a(this.O, var5);
                     if (var28 != 0) {
                        this.a(var5 + 6, var2.getAutoFilter());
                     }

                     var5 += 6 + var28;
                  }

                  if ((var13 & 4294967295L & 4L) != 0L) {
                     var28 = com.aspose.cells.b.a.zc.e(this.O, var5) & '\uffff';
                     var5 += 2 + var28;
                  }

                  if ((var13 & 4294967295L & 8L) != 0L) {
                     var28 = com.aspose.cells.b.a.zc.e(this.O, var5) & '\uffff';
                     var10.f = new byte[var28];
                     System.arraycopy(this.O, var5, var10.f, 0, var28 + 2);
                     var5 += var28 + 2;
                  }

                  if ((var13 & 4294967295L & 128L) != 0L) {
                     var28 = com.aspose.cells.b.a.zc.e(this.O, var5) & '\uffff';
                     var10.g = new byte[var28];
                     System.arraycopy(this.O, var5, var10.g, 0, var28 + 2);
                     var5 += var28 + 2;
                  }

                  if ((var13 & 4294967295L & 1024L) != 0L) {
                     var17 = new int[]{var5};
                     var10.d(a(this.O, var17));
                     var5 = var17[0];
                  }

                  if (this.O[12] == 1) {
                     com.aspose.cells.b.a.zc.a(this.O, var5);
                     var5 += 4;
                     com.aspose.cells.b.a.zc.a(this.O, var5);
                     var5 += 4;
                     com.aspose.cells.b.a.zc.d(this.O, var5);
                     var5 += 4;
                     long var21 = com.aspose.cells.b.a.zc.d(this.O, var5);
                     var5 += 4;
                     int var23;
                     if ((var21 & 4294967295L & 16L) != 0L) {
                        switch(var10.n) {
                        case 1:
                        case 8:
                        case 11:
                           var23 = com.aspose.cells.b.a.zc.e(this.O, var5) & '\uffff';
                           var5 += 2;
                           var5 += this.O[var5 + 2] == 0 ? var23 + 3 : var23 * 2 + 3;
                           break;
                        case 2:
                        case 6:
                           var5 += 8;
                           break;
                        case 3:
                           var5 += 4;
                           break;
                        case 4:
                           var5 += 8;
                        case 5:
                        case 7:
                        case 9:
                        case 10:
                        }
                     }

                     if ((var21 & 4294967295L & 64L) != 0L) {
                        var23 = com.aspose.cells.b.a.zc.e(this.O, var5) & '\uffff';
                        var5 += 2 + var23;
                     }

                     var5 += 4;
                  }

                  if (this.O[12] == 3) {
                     ;
                  }
               }

            }
         }
      }
   }

   private void U(zpb var1) throws Exception {
      while(true) {
         this.L = var1.b(this.N);
         if ((this.L & '\uffff') != 2162) {
            var1.a(-2);
            return;
         }

         this.T(var1);
      }
   }

   static int a(byte[] var0, int var1, Style var2) throws Exception {
      WorksheetCollection var3 = var2.e();
      long var5 = com.aspose.cells.b.a.zc.d(var0, var1);
      int var4 = var1 + 4;
      int var7 = com.aspose.cells.b.a.zc.e(var0, var4);
      boolean var8 = (var0[var4] & 255 & 1) != 0;
      var4 += 2;
      if ((var5 & 4294967295L) == 0L) {
         return var4;
      } else {
         int var9;
         int var10;
         if ((var5 & 4294967295L & 33554432L) != 0L) {
            if (!var8) {
               var9 = var0[var4 + 1] & 255;

               for(var10 = 0; var10 < var3.A().size(); ++var10) {
                  zxw var11 = (zxw)var3.A().get(var10);
                  if (var11.b() == var9) {
                     if (var11.a() != null && !"".equals(var11.a())) {
                        var2.setCustom(var11.a());
                     }
                     break;
                  }
               }

               var2.d(var9);
               var4 += 2;
            } else {
               var9 = com.aspose.cells.b.a.zc.e(var0, var4) & '\uffff';
               var4 += 2;
               if (var9 > 0) {
                  int[] var17 = new int[]{var4};
                  var2.setCustom(a(var0, var17));
                  var4 = var17[0];
               }
            }
         }

         boolean var12;
         boolean var13;
         boolean var16;
         if ((var5 & 4294967295L & 67108864L) != 0L) {
            var16 = com.aspose.cells.b.a.zc.a(var0, var4 + 92) == 0;
            boolean var18 = com.aspose.cells.b.a.zc.a(var0, var4 + 96) == 0;
            boolean var19 = com.aspose.cells.b.a.zc.a(var0, var4 + 100) == 0;
            var12 = (var0[var4 + 88] & 255 & 2) == 0;
            var13 = (var0[var4 + 88] & 255 & 128) == 0;
            int var14 = com.aspose.cells.b.a.zc.a(var0, var4 + 64);
            if (var14 != -1) {
               var2.getFont().setSize((short)(var14 / 20));
            }

            if (var12) {
               var2.getFont().setItalic((var0[var4 + 68] & 255 & 2) != 0);
            }

            if (var19) {
               var2.getFont().b(com.aspose.cells.b.a.zc.e(var0, var4 + 72) & '\uffff');
            }

            if (var13) {
               var2.getFont().setStrikeout((var0[var4 + 68] & 255 & 128) != 0);
            }

            if (var16) {
               short var15 = com.aspose.cells.b.a.zc.b(var0, var4 + 74);
               switch(var15) {
               case 1:
                  var2.getFont().setSuperscript(true);
                  break;
               case 2:
                  var2.getFont().setSubscript(true);
               }
            }

            if (var18) {
               switch(com.aspose.cells.b.a.zc.b(var0, var4 + 76)) {
               case 0:
                  var2.getFont().setUnderline(0);
                  break;
               case 1:
                  var2.getFont().setUnderline(1);
                  break;
               case 2:
                  var2.getFont().setUnderline(2);
                  break;
               case 33:
                  var2.getFont().setUnderline(3);
                  break;
               case 34:
                  var2.getFont().setUnderline(4);
               }
            }

            var14 = com.aspose.cells.b.a.zc.a(var0, var4 + 80);
            if (var14 != -1) {
               var2.getFont().setColor(var3.m().e(var14));
            }

            var4 += 118;
         }

         if ((var5 & 4294967295L & 134217728L) != 0L) {
            if ((var5 & 4294967295L & 1L) == 0L) {
               var2.setHorizontalAlignment(zsk.a(var0[var4] & 255 & 7, false));
            }

            if ((var5 & 4294967295L & 2L) == 0L) {
               var2.setHorizontalAlignment(zsk.a((var0[var4] & 255 & 112) >> 4, true));
            }

            if ((var5 & 4294967295L & 4L) == 0L) {
               var2.setTextWrapped((var0[var4] & 255 & 128) != 0);
            }

            if ((var5 & 4294967295L & 8L) == 0L) {
               var2.setRotationAngle(var0[var4 + 1]);
            }

            if ((var5 & 4294967295L & 16L) == 0L) {
               ;
            }

            if ((var5 & 4294967295L & 32L) == 0L) {
               var9 = var0[var4 + 2] & 255 & 15;
               var10 = var0[var4 + 4] & 255;
               if (var10 != 255) {
                  var2.setIndentLevel(var10);
               } else {
                  var2.setIndentLevel(var9);
               }
            }

            if ((var5 & 4294967295L & 64L) == 0L) {
               var2.setShrinkToFit((var0[var4 + 2] & 255 & 16) != 0);
            }

            if ((var5 & 4294967295L & 128L) == 0L) {
               ;
            }

            if ((var5 & 4294967295L & 2147483648L) != 0L) {
               switch((var0[var4 + 2] & 255 & 192) >> 2) {
               case 0:
                  var2.setTextDirection(0);
                  break;
               case 1:
                  var2.setTextDirection(1);
                  break;
               case 2:
                  var2.setTextDirection(2);
               }
            }

            var4 += 8;
         }

         if ((var5 & 4294967295L & 268435456L) != 0L) {
            if ((var7 & '\uffff' & 4) != 0) {
               var2.getBorders().a = true;
            }

            var9 = com.aspose.cells.b.a.zc.e(var0, var4);
            long var20 = (long)(com.aspose.cells.b.a.zc.e(var0, var4 + 2) & '\uffff');
            var12 = false;
            var13 = false;
            boolean var22 = false;
            int var21;
            if ((var5 & 4294967295L & 1024L) == 0L) {
               var2.getBorders().getByBorderType(1).setLineStyle(var9 & '\uffff' & 15);
               var21 = (int)(var20 & 4294967295L & 63L);
               var2.getBorders().getByBorderType(1).setColor(var3.m().e(var21));
            }

            if ((var5 & 4294967295L & 2048L) == 0L) {
               var2.getBorders().getByBorderType(2).setLineStyle((var9 & '\uffff' & 240) >> 4);
               var21 = (int)((var20 & 4294967295L & 1016L) >> 7);
               var2.getBorders().getByBorderType(2).setColor(var3.m().e(var21));
            }

            var13 = (var20 & 4294967295L & 16384L) != 0L;
            var22 = (var20 & 4294967295L & 32768L) != 0L;
            var20 = com.aspose.cells.b.a.zc.d(var0, var4 + 4);
            if ((var5 & 4294967295L & 4096L) == 0L) {
               var2.getBorders().getByBorderType(4).setLineStyle((var9 & '\uffff' & 3840) >> 8);
               var21 = (int)(var20 & 4294967295L & 63L);
               var2.getBorders().getByBorderType(4).setColor(var3.m().e(var21));
            }

            if ((var5 & 4294967295L & 8192L) == 0L) {
               var2.getBorders().getByBorderType(8).setLineStyle((var9 & '\uffff' & '\uf000') >> 12);
               var21 = (int)((var20 & 4294967295L & 1016L) >> 7);
               var2.getBorders().getByBorderType(8).setColor(var3.m().e(var21));
            }

            if ((var5 & 4294967295L & 16384L) == 0L && var13) {
               var2.getBorders().getByBorderType(16).setLineStyle((int)((var20 & 4294967295L & 31457280L) >> 21));
               var21 = (int)((var20 & 4294967295L & 130048L) >> 14);
               var2.getBorders().getByBorderType(16).setColor(var3.m().e(var21));
            }

            if ((var5 & 4294967295L & 32768L) == 0L && var22) {
               var2.getBorders().getByBorderType(32).setLineStyle((int)((var20 & 4294967295L & 31457280L) >> 21));
               var21 = (int)((var20 & 4294967295L & 130048L) >> 14);
               var2.getBorders().getByBorderType(32).setColor(var3.m().e(var21));
            }

            var4 += 8;
         }

         if ((var5 & 4294967295L & 536870912L) != 0L) {
            if ((var5 & 4294967295L & 65536L) == 0L) {
               var2.setPattern((var0[var4 + 1] & 255) >> 2);
            }

            var16 = false;
            if ((var5 & 4294967295L & 131072L) == 0L) {
               var9 = var0[var4 + 2] & 255 & 127;
               var2.setForegroundColor(var3.m().e(var9));
            }

            if ((var5 & 4294967295L & 262144L) == 0L) {
               var9 = (com.aspose.cells.b.a.zc.e(var0, var4 + 2) & '\uffff' & 16256) >> 7;
               var2.setBackgroundColor(var3.m().e(var9));
            }

            var4 += 4;
         }

         if ((var5 & 4294967295L & 1073741824L) != 0L) {
            if ((var5 & 4294967295L & 256L) == 0L) {
               var2.setLocked((var0[var4] & 255 & 1) != 0);
            }

            if ((var5 & 4294967295L & 512L) == 0L) {
               var2.setFormulaHidden((var0[var4] & 255 & 2) != 0);
            }

            var4 += 2;
         }

         return var4;
      }
   }

   private static String a(byte[] var0, int[] var1) throws Exception {
      int var2 = com.aspose.cells.b.a.zc.e(var0, var1[0]) & '\uffff';
      String var3 = null;
      if (var0[var1[0] + 2] == 0) {
         var3 = Encoding.getASCII().a(var0, var1[0] + 3, var2);
         var1[0] += 3 + var2;
      } else {
         var3 = Encoding.getUnicode().a(var0, var1[0] + 3, var2 * 2);
         var1[0] += 3 + var2 * 2;
      }

      return var3;
   }

   private byte[] V(zpb var1) throws Exception {
      this.a(var1);
      byte[] var2 = this.O;

      while(true) {
         this.L = var1.b(this.N);
         if ((this.L & '\uffff') != 2165) {
            var1.a(-2);
            return var2;
         }

         this.a(var1);
         byte[] var3 = new byte[var2.length + (this.M & '\uffff') - 12];
         System.arraycopy(var2, 0, var3, 0, var2.length);
         System.arraycopy(this.O, 12, var3, var2.length, (this.M & '\uffff') - 12);
         var2 = var3;
      }
   }

   private void a(PageSetup var1, zpb var2, byte[] var3) throws Exception {
      this.a(var2);
      int var4 = 12;
      int var6;
      if (var4 + 16 < (this.M & '\uffff')) {
         boolean var5 = true;
         if (var3 == null) {
            for(var6 = 0; var6 < 16; ++var6) {
               if (this.O[var4 + var6] != 0) {
                  var5 = false;
                  break;
               }
            }
         } else {
            for(var6 = 0; var6 < 16; ++var6) {
               if (this.O[var4 + var6] != var3[var6]) {
                  var5 = false;
                  break;
               }
            }
         }

         if (var5) {
            var4 += 16;
         }
      }

      var1.a(this.O[var4]);
      var4 += 2;
      int var10 = com.aspose.cells.b.a.zc.e(this.O, var4) & '\uffff';
      var6 = com.aspose.cells.b.a.zc.e(this.O, var4 + 2) & '\uffff';
      int var7 = com.aspose.cells.b.a.zc.e(this.O, var4 + 4) & '\uffff';
      int var8 = com.aspose.cells.b.a.zc.e(this.O, var4 + 6) & '\uffff';
      var4 += 8;
      String var9;
      if (var10 != 0) {
         var10 = com.aspose.cells.b.a.zc.e(this.O, var4) & '\uffff';
         var4 += 2;
         var9 = null;
         if (this.O[var4] == 0) {
            var9 = Encoding.getASCII().a(this.O, var4 + 1, var10);
            var4 += 1 + var10;
         } else {
            var9 = Encoding.getUnicode().a(this.O, var4 + 1, var10 * 2);
            var4 += 1 + var10 * 2;
         }

         var1.c = new String[3];
         PageSetup.a(var9, var1.c);
      }

      if (var6 != 0) {
         var6 = com.aspose.cells.b.a.zc.e(this.O, var4) & '\uffff';
         var4 += 2;
         var9 = null;
         if (this.O[var4] == 0) {
            var9 = Encoding.getASCII().a(this.O, var4 + 1, var6);
            var4 += 1 + var6;
         } else {
            var9 = Encoding.getUnicode().a(this.O, var4 + 1, var6 * 2);
            var4 += 1 + var6 * 2;
         }

         var1.d = new String[3];
         PageSetup.a(var9, var1.d);
      }

      if (var7 != 0) {
         var7 = com.aspose.cells.b.a.zc.e(this.O, var4) & '\uffff';
         var4 += 2;
         var9 = null;
         if (this.O[var4] == 0) {
            var9 = Encoding.getASCII().a(this.O, var4 + 1, var7);
            var4 += 1 + var7;
         } else {
            var9 = Encoding.getUnicode().a(this.O, var4 + 1, var7 * 2);
            var4 += 1 + var7 * 2;
         }

         var1.f = new String[3];
         PageSetup.a(var9, var1.f);
      }

      if (var8 != 0) {
         var8 = com.aspose.cells.b.a.zc.e(this.O, var4) & '\uffff';
         var4 += 2;
         var9 = null;
         int var10000;
         if (this.O[var4] == 0) {
            var9 = Encoding.getASCII().a(this.O, var4 + 1, var8);
            var10000 = var4 + 1 + var8;
         } else {
            var9 = Encoding.getUnicode().a(this.O, var4 + 1, var8 * 2);
            var10000 = var4 + 1 + var8 * 2;
         }

         var1.e = new String[3];
         PageSetup.a(var9, var1.e);
      }

   }

   private void W(zpb var1) throws Exception {
      this.a(var1);
      int var2 = com.aspose.cells.b.a.zc.a(this.O, 2);
      int var3 = this.O[6] & 255;
      if (var3 + 7 <= (this.M & '\uffff')) {
         String var4 = Encoding.getASCII().a(this.O, 7, var3);
         int var5 = 7 + var3;
         int var6 = (this.M & '\uffff') - var5;
         String var7 = "";
         if (var2 > var6) {
            byte[] var8 = new byte[var2];
            System.arraycopy(this.O, var5, var8, 0, var6);

            for(var5 = var6; var5 < var2; var5 += this.M & '\uffff') {
               this.L = var1.b(this.N);
               if ((this.L & '\uffff') != 1084 && (this.L & '\uffff') != 60) {
                  break;
               }

               this.a(var1);
               System.arraycopy(this.O, 0, var8, var5, this.M & '\uffff');
            }

            var7 = Encoding.getUnicode().a(var8, 0, var2);
         } else {
            var7 = Encoding.getUnicode().a(this.O, var5, var2);
         }

         this.g.getCustomProperties().add(var4, var7);
      }
   }

   private int a(int var1, AutoFilter var2) {
      zvo var3 = null;
      int var4 = var1 + 24;
      boolean var12 = false;

      try {
         boolean var6;
         boolean var7;
         int var8;
         var12 = true;
         int var5 = com.aspose.cells.b.a.zc.e(this.O, var1 + 0) & '\uffff';
         var3 = new zvo(var5);
         var3.b = com.aspose.cells.b.a.zc.e(this.O, var1 + 2);
         var1 += 4;
         var6 = false;
         var7 = false;
         label217:
         switch(this.O[var1]) {
         case 0:
            var6 = true;
         case 1:
         case 3:
         case 5:
         case 7:
         case 9:
         case 10:
         case 11:
         default:
            break;
         case 2:
            var3.f = zavz.a(this.O, var1 + 2);
            break;
         case 4:
            var3.f = com.aspose.cells.b.a.zc.f(this.O, var1 + 2);
            break;
         case 6:
            var8 = this.O[var1 + 6] & 255;
            if (this.O[var4] == 0) {
               var3.f = Encoding.getASCII().a(this.O, var4 + 1, var8);
               var4 += 1 + var8;
            } else {
               var3.f = Encoding.getUnicode().a(this.O, var4 + 1, var8 * 2);
               var4 += 1 + var8 * 2;
            }
            break;
         case 8:
            if (this.O[var1 + 3] == 1) {
               switch(this.O[var1 + 2]) {
               case 0:
                  var3.f = "#NULL!";
                  break label217;
               case 7:
                  var3.f = "#DIV/0!";
                  break label217;
               case 15:
                  var3.f = "#VALUE!";
                  break label217;
               case 23:
                  var3.f = "#REF!";
                  break label217;
               case 29:
                  var3.f = "#NAME?";
                  break label217;
               case 36:
                  var3.f = "#NUM!";
                  break label217;
               case 42:
                  var3.f = "#N/A";
               }
            } else {
               var3.f = this.O[var1 + 2] == 1;
            }
            break;
         case 12:
            var3.c = 2;
            var7 = true;
            break;
         case 13:
            var3.c = 4;
            var7 = true;
         }

         if (!var6 && !var7) {
            switch(this.O[var1 + 1]) {
            case 0:
               var3.c = 6;
               break;
            case 1:
               var3.c = 1;
               break;
            case 2:
               var3.c = 2;
               break;
            case 3:
               var3.c = 0;
               break;
            case 4:
               var3.c = 3;
               break;
            case 5:
               var3.c = 4;
               break;
            case 6:
               var3.c = 5;
            }
         }

         var6 = false;
         var7 = false;
         var1 += 10;
         label202:
         switch(this.O[var1]) {
         case 0:
            var6 = true;
         case 1:
         case 3:
         case 5:
         case 7:
         case 9:
         case 10:
         case 11:
         default:
            break;
         case 2:
            var3.e = zavz.a(this.O, var1 + 2);
            break;
         case 4:
            var3.e = com.aspose.cells.b.a.zc.f(this.O, var1 + 2);
            break;
         case 6:
            var8 = this.O[var1 + 6] & 255;
            if (this.O[var4] == 0) {
               var3.e = Encoding.getASCII().a(this.O, var4 + 1, var8);
               var4 += 1 + var8;
            } else {
               var3.e = Encoding.getUnicode().a(this.O, var4 + 1, var8 * 2);
               var4 += 1 + var8 * 2;
            }
            break;
         case 8:
            if (this.O[var1 + 3] == 1) {
               switch(this.O[var1 + 2]) {
               case 0:
                  var3.e = "#NULL!";
                  break label202;
               case 7:
                  var3.e = "#DIV/0!";
                  break label202;
               case 15:
                  var3.e = "#VALUE!";
                  break label202;
               case 23:
                  var3.e = "#REF!";
                  break label202;
               case 29:
                  var3.e = "#NAME?";
                  break label202;
               case 36:
                  var3.e = "#NUM!";
                  break label202;
               case 42:
                  var3.e = "#N/A";
               }
            } else {
               var3.e = this.O[var1 + 2] == 1;
            }
            break;
         case 12:
            var3.d = 2;
            var7 = true;
            break;
         case 13:
            var3.d = 4;
            var7 = true;
         }

         if (!var6) {
            if (!var7) {
               switch(this.O[var1 + 1]) {
               case 0:
                  var3.d = 6;
                  var12 = false;
                  break;
               case 1:
                  var3.d = 1;
                  var12 = false;
                  break;
               case 2:
                  var3.d = 2;
                  var12 = false;
                  break;
               case 3:
                  var3.d = 0;
                  var12 = false;
                  break;
               case 4:
                  var3.d = 3;
                  var12 = false;
                  break;
               case 5:
                  var3.d = 4;
                  var12 = false;
                  break;
               case 6:
                  var3.d = 5;
                  var12 = false;
                  break;
               default:
                  var12 = false;
               }
            } else {
               var12 = false;
            }
         } else {
            var12 = false;
         }
      } finally {
         if (var12) {
            FilterColumn var10 = var3.a(var2.e);
            var2.e.a(var10);
            var2.d = false;
         }
      }

      FilterColumn var14 = var3.a(var2.e);
      var2.e.a(var14);
      var2.d = false;
      return var4;
   }

   private void X(zpb var1) throws Exception {
      this.a(var1);
      int var2 = com.aspose.cells.b.a.zc.e(this.O, 12) & '\uffff';
      AutoFilter var3 = null;
      int var4 = com.aspose.cells.b.a.zc.a(this.O, 40);
      if (this.O[34] != 8 && var4 != -1) {
         ListObject var5 = this.g.getListObjects().a(var4);
         var3 = var5.getAutoFilter();
      } else {
         var3 = this.g.getAutoFilter();
      }

      FilterColumn var13 = new FilterColumn(var3.getFilterColumns(), var2);
      var13.a(com.aspose.cells.b.a.zc.a(this.O, 14) == 1);
      int var6 = com.aspose.cells.b.a.zc.a(this.O, 18);
      int var7 = com.aspose.cells.b.a.zc.a(this.O, 22);
      if (var6 == 0 && var7 == 0) {
         int var8 = com.aspose.cells.b.a.zc.a(this.O, 26);
         int var9 = com.aspose.cells.b.a.zc.a(this.O, 30);
         MultipleFilterCollection var10 = new MultipleFilterCollection();

         int var11;
         for(var11 = 0; var11 < var8; ++var11) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 2175) {
               var1.a(-2);
               return;
            }

            this.a(var1);
            switch(this.O[12]) {
            case 6:
               if (this.O[13] == 2) {
                  if (this.O[22] == 0) {
                     var10.b(com.aspose.cells.b.a.g.za.getASCII().a(this.O, 23, this.O[14] & 255));
                  } else {
                     var10.b(Encoding.getUnicode().a(this.O, 23, (this.O[14] & 255) * 2));
                  }
               }
               break;
            case 12:
               var10.setMatchBlank(true);
            }
         }

         for(var11 = 0; var11 < var9; ++var11) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 2175) {
               var1.a(-2);
               return;
            }

            this.a(var1);
            DateTimeGroupItem var12 = new DateTimeGroupItem();
            var12.setYear(com.aspose.cells.b.a.zc.b(this.O, 12));
            var12.setMonth(com.aspose.cells.b.a.zc.b(this.O, 14));
            var12.setDay(com.aspose.cells.b.a.zc.a(this.O, 16));
            var12.setHour(com.aspose.cells.b.a.zc.b(this.O, 20));
            var12.setMinute(com.aspose.cells.b.a.zc.b(this.O, 22));
            var12.setSecond(com.aspose.cells.b.a.zc.b(this.O, 24));
            switch(this.O[32]) {
            case 1:
               var12.setDateTimeGroupingType(3);
               break;
            case 2:
               var12.setDateTimeGroupingType(0);
               break;
            case 3:
               var12.setDateTimeGroupingType(1);
               break;
            case 4:
               var12.setDateTimeGroupingType(2);
               break;
            case 5:
               var12.setDateTimeGroupingType(4);
               break;
            default:
               var12.setDateTimeGroupingType(5);
            }

            var10.a(var12);
         }

         var13.setFilter(var10);
         var13.setFilterType(3);
         var3.e.a(var13);
      }
   }

   private void Y(zpb var1) throws Exception {
      if ((this.a & 4) == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         int var2 = com.aspose.cells.b.a.zc.e(this.O, 6) & '\uffff';
         Shape var3 = null;
         Iterator var4 = this.g.getShapes().iterator();

         while(var4.hasNext()) {
            Shape var5 = (Shape)var4.next();
            if (var5.K() == var2) {
               var3 = var5;
               break;
            }
         }

         if (var3 != null && var3 instanceof CommentShape) {
            Comment var6 = ((CommentShape)var3).a();
            var6.a(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff');
            var6.b(this.O[2] & 255);
            this.g.getComments().a(var6);
            var6.a(true);
            int var7 = com.aspose.cells.b.a.zc.e(this.O, 8) & '\uffff';
            if (this.O[10] == 0) {
               var6.setAuthor(Encoding.getASCII().a(this.O, 11, var7));
            } else {
               var6.setAuthor(Encoding.getUnicode().a(this.O, 11, var7 * 2));
            }

         }
      }
   }

   private void Z(zpb var1) throws Exception {
      ArrayList var2 = new ArrayList();
      var1.a(-2);
      this.e(var1);
      com.aspose.cells.b.a.a.ze.a(var2, (Object)this.O);
      int var3 = this.O.length - 12;
      int var4 = com.aspose.cells.b.a.zc.a(this.O, 8);

      for(var4 -= var3; var4 > 0; var4 -= this.O.length - 4) {
         this.e(var1);
         short var5 = com.aspose.cells.b.a.zc.b(this.O, 0);
         if (var5 != 233 && var5 != 60) {
            throw new IOException("File is corrupted");
         }

         com.aspose.cells.b.a.a.ze.a(var2, (Object)this.O);
      }

      this.g.b(var2);
   }

   private void aa(zpb var1) throws Exception {
      this.a(var1);
      if (this.O[2] == 0) {
         this.g.k = zco.a(this.O, 3, this.O.length - 3);
      } else {
         this.g.k = Encoding.getUnicode().a(this.O, 3, this.O.length - 3);
      }

   }

   private void ab(zpb var1) throws Exception {
      if ((this.a & 64) == 0) {
         this.h(var1);
      } else {
         zauz var2 = new zauz();
         var2.a(this.d, this.g, this, var1);
      }
   }

   private void a(zpb var1, zbcj var2) throws Exception {
      if (this.a == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         zbci var3 = new zbci(this.O[0] & 255);
         var3.a(this.O[0]);
         var3.a(com.aspose.cells.b.a.zc.e(this.O, 1));
         var3.b(com.aspose.cells.b.a.zc.b(this.O, 3));
         var3.c(com.aspose.cells.b.a.zc.e(this.O, 5));

         for(int var4 = 9; var4 + 6 <= this.O.length; var4 += 6) {
            CellArea var5 = new CellArea();
            var5.StartRow = com.aspose.cells.b.a.zc.e(this.O, var4) & '\uffff';
            var5.EndRow = com.aspose.cells.b.a.zc.e(this.O, var4 + 2) & '\uffff';
            var5.StartColumn = this.O[var4 + 4] & 255;
            var5.EndColumn = this.O[var4 + 5] & 255;
            com.aspose.cells.b.a.a.ze.a(var3.b(), (Object)var5);
         }

         com.aspose.cells.b.a.a.ze.a(var2, (Object)var3);
      }
   }

   private void ac(zpb var1) throws Exception {
      var1.a(-2);
      if (this.g.q() == null) {
         this.g.a(new ArrayList());
      }

      while(true) {
         this.L = var1.b(this.N);
         if ((this.L & '\uffff') == 442 || (this.L & '\uffff') == 10 || (this.L & '\uffff') == 239 || (this.L & '\uffff') == 432) {
            var1.a(-2);
            return;
         }

         this.M = var1.b(this.N);
         var1.a(-4);
         this.O = new byte[(this.M & '\uffff') + 4];
         var1.a(this.O);
         com.aspose.cells.b.a.a.ze.a(this.g.q(), (Object)this.O);
      }
   }

   private void ad(zpb var1) throws Exception {
      this.a(var1);
      this.g.b(com.aspose.cells.b.a.zc.e(this.O, 0) & '\uffff' & 1023);
      if ((this.O[1] & 255 & 8) != 0) {
         this.g.setViewType(1);
      }

      this.g.setFirstVisibleRow(com.aspose.cells.b.a.zc.e(this.O, 2));
      this.g.setFirstVisibleColumn(this.O[4] & 255 & 255);
      this.g.f(this.O[6]);
      if ((this.M & '\uffff') > 10) {
         int var2 = com.aspose.cells.b.a.zc.e(this.O, 10) & '\uffff';
         if (var2 != 0) {
            this.g.u()[1] = var2;
         }

         var2 = com.aspose.cells.b.a.zc.e(this.O, 12) & '\uffff';
         if (var2 != 0) {
            this.g.u()[0] = var2;
         }
      }

   }

   private void ae(zpb var1) throws Exception {
      this.a(var1);
      znd var2 = new znd();
      this.d.k().a(var2);
      byte var3 = 4;
      var2.a = com.aspose.cells.b.a.zc.b(this.O, var3);
      int var6 = var3 + 4;
      byte[] var4 = new byte[16];
      System.arraycopy(this.O, var6, var4, 0, 16);
      var2.b = new com.aspose.cells.b.a.zh(var4);
      var6 += 16;
      var2.c = com.aspose.cells.b.a.zc.a(this.O, var6);
      var2.d = com.aspose.cells.b.a.zc.a(this.O, var6 + 4);
      var2.e = com.aspose.cells.b.a.zc.a(this.O, var6 + 8);
      var2.f = com.aspose.cells.b.a.zc.a(this.O, var6 + 12);
      var6 += 16;
      var2.h = com.aspose.cells.b.a.zc.b(this.O, var6);
      var6 += 2;
      int var5 = com.aspose.cells.b.a.zc.b(this.O, var6);
      var2.a((var5 & 1) != 0);
      var2.b((var5 & 2) != 0);
      switch(var5 & 12) {
      case 0:
         var2.a(2);
         break;
      case 4:
         var2.a(1);
         break;
      case 8:
         var2.a(0);
      }

      var2.n((var5 & 16) != 0);
      var2.c((var5 & 32) != 0);
      var2.d((var5 & 64) != 0);
      var2.m((var5 & 128) != 0);
      switch(var5 & 768) {
      case 0:
         var2.b(0);
         break;
      case 256:
         var2.b(2);
         break;
      case 512:
         var2.b(1);
      }

      var2.e((var5 & 1024) != 0);
      var2.f((var5 & 2048) != 0);
      var2.g((var5 & 4096) != 0);
      var2.h((var5 & 8192) != 0);
      var2.i((var5 & 16384) != 0);
      var2.j((var5 & '耀') != 0);
      var6 += 4;
      var2.k((this.O[var6] & 255 & 1) != 0);
      var2.l((this.O[var6] & 255 & 2) != 0);
      var6 += 2;
      var2.i = com.aspose.cells.b.a.zc.e(this.O, var6) & '\uffff';
      var6 += 2;
      var2.j = zco.a(this.O, var6);
   }

   private void af(zpb var1) throws Exception {
      this.a(var1);
      znb var2 = new znb(this.g);
      this.g.D().a(var2);
      byte[] var3 = new byte[16];
      System.arraycopy(this.O, 0, var3, 0, 16);
      var2.n = new com.aspose.cells.b.a.zh(var3);
      byte var4 = 16;
      var2.q = com.aspose.cells.b.a.zc.b(this.O, var4);
      int var16 = var4 + 4;
      var2.c(com.aspose.cells.b.a.zc.b(this.O, var16));
      var16 += 4;
      var2.f(com.aspose.cells.b.a.zc.b(this.O, var16));
      var16 += 4;
      var2.c().a(this.O[var16]);
      var16 += 4;
      int var5 = com.aspose.cells.b.a.zc.a(this.O, var16);
      var2.d((var5 & 1) != 0);
      var2.l((var5 & 2) != 0);
      var2.m((var5 & 4) != 0);
      var2.n((var5 & 8) != 0);
      var2.r((var5 & 16) != 0);
      var2.q((var5 & 32) != 0);
      var2.e().setCenterHorizontally((var5 & 64) != 0);
      var2.e().setCenterVertically((var5 & 128) != 0);
      var2.e().setPrintHeadings((var5 & 256) != 0);
      var2.e().setPrintGridlines((var5 & 512) != 0);
      var2.e().setPercentScale((var5 & 1024) != 0);
      var2.h((var5 & 2048) != 0);
      var2.i((var5 & 4096) != 0);
      var2.c((var5 & 8192) != 0);
      var2.e((var5 & 16384) != 0);
      var2.o((var5 & '耀') != 0);
      var2.p((var5 & 65536) == 0);
      var2.k((var5 & 131072) != 0);
      var2.j((var5 & 262144) != 0);
      var2.a((var5 & 524288) != 0);
      var2.b((var5 & 2097152) != 0);
      var2.g((var5 & 33554432) != 0);
      var2.d((var5 & 67108864) == 0 ? 0 : 1);
      if ((var5 & 134217728) != 0) {
         var2.d(2);
      }

      var2.s((var5 & 536870912) != 0);
      var16 += 4;
      var2.p.StartRow = com.aspose.cells.b.a.zc.e(this.O, var16) & '\uffff';
      var2.p.EndRow = com.aspose.cells.b.a.zc.e(this.O, var16 + 2) & '\uffff';
      var2.p.StartColumn = com.aspose.cells.b.a.zc.b(this.O, var16 + 4);
      var2.p.EndColumn = com.aspose.cells.b.a.zc.b(this.O, var16 + 6);
      var16 += 8;
      var2.e = com.aspose.cells.b.a.zc.f(this.O, var16);
      var2.f = com.aspose.cells.b.a.zc.f(this.O, var16 + 8);
      var16 += 16;
      if (var16 < this.O.length) {
         var2.g = true;
         var2.c().setFirstVisibleColumnOfRightPane(com.aspose.cells.b.a.zc.e(this.O, var16));
         var2.c().setFirstVisibleRowOfBottomPane(com.aspose.cells.b.a.zc.e(this.O, var16 + 2));
      }

      label272:
      while(true) {
         this.L = var1.b(this.N);
         double var17;
         switch(this.L) {
         case 20:
            this.a(var1);
            if (this.O != null && this.O.length != 0) {
               var2.e().c(this.O);
            }
            break;
         case 21:
            this.a(var1);
            if (this.O != null && this.O.length != 0) {
               var2.e().d(this.O);
            }
            break;
         case 26:
            this.a(var1, var2.g());
            break;
         case 27:
            this.a(var1, var2.f());
            break;
         case 29:
            this.a(var1, var2.d());
            break;
         case 38:
            this.a(var1);
            var17 = com.aspose.cells.b.a.zc.f(this.O, 0);
            if (var17 < 0.0D || var17 > 49.0D) {
               var17 = 0.0D;
            }

            var2.e().setLeftMarginInch(var17);
            break;
         case 39:
            this.a(var1);
            var17 = com.aspose.cells.b.a.zc.f(this.O, 0);
            if (var17 < 0.0D || var17 > 49.0D) {
               var17 = 0.0D;
            }

            var2.e().setRightMarginInch(var17);
            break;
         case 40:
            this.a(var1);
            var17 = com.aspose.cells.b.a.zc.f(this.O, 0);
            if (var17 < 0.0D || var17 > 49.0D) {
               var17 = 0.0D;
            }

            var2.e().setTopMarginInch(var17);
            break;
         case 41:
            this.a(var1);
            var17 = com.aspose.cells.b.a.zc.f(this.O, 0);
            if (var17 < 0.0D || var17 > 49.0D) {
               var17 = 0.0D;
            }

            var2.e().setBottomMarginInch(var17);
            break;
         case 42:
            this.a(var1);
            if (this.O[0] == 0 && this.O[1] == 0) {
               var2.e().setPrintHeadings(false);
               break;
            }

            var2.e().setPrintHeadings(true);
            break;
         case 43:
            this.a(var1);
            if (this.O[0] == 0 && this.O[1] == 0) {
               var2.e().setPrintGridlines(false);
               break;
            }

            var2.e().setPrintGridlines(true);
            break;
         case 65:
            this.a(var1, var2.c());
            break;
         case 77:
            this.M = var1.b(this.N);
            int var6 = var1.b(this.N) & '\uffff';
            if (var6 != 0) {
               var1.a((this.M & '\uffff') - 2);
               break;
            } else {
               byte[] var7 = new byte[(this.M & '\uffff') - 2];
               var1.a(var7);
               ArrayList var8 = new ArrayList();
               com.aspose.cells.b.a.a.ze.a(var8, (Object)var7);
               int var9 = var7.length;

               while(true) {
                  while(true) {
                     this.L = var1.b(this.N);
                     if ((this.L & '\uffff') == 77) {
                        this.M = var1.b(this.N);
                        var6 = var1.b(this.N) & '\uffff';
                        var7 = new byte[(this.M & '\uffff') - 2];
                        var1.a(var7);
                        com.aspose.cells.b.a.a.ze.a(var8, (Object)var7);
                        var9 += var7.length;
                     } else {
                        if ((this.L & '\uffff') != 60) {
                           var1.a(-2);
                           byte[] var10 = new byte[var9];
                           var9 = 0;

                           for(int var18 = 0; var18 < var8.size(); ++var18) {
                              var7 = (byte[])((byte[])var8.get(var18));
                              System.arraycopy(var7, 0, var10, var9, var7.length);
                              var9 += var7.length;
                           }

                           var2.e().a(var10);
                           continue label272;
                        }

                        this.a(var1);
                        com.aspose.cells.b.a.a.ze.a(var8, (Object)this.O);
                        var9 += this.M & '\uffff';
                     }
                  }
               }
            }
         case 129:
            this.a(var1);
            short var11 = com.aspose.cells.b.a.zc.b(this.O, 0);
            if ((var11 & 256) == 0) {
               var2.e().setPercentScale(true);
            } else {
               var2.e().setPercentScale(false);
            }

            if ((var11 & 64) == 0) {
               var2.h().SummaryRowBelow = false;
            }

            if ((var11 & 128) == 0) {
               var2.h().SummaryColumnRight = false;
            }
            break;
         case 131:
            this.a(var1);
            if (this.O[0] == 0 && this.O[1] == 0) {
               var2.e().setCenterHorizontally(false);
               break;
            }

            var2.e().setCenterHorizontally(true);
            break;
         case 132:
            this.a(var1);
            if (this.O[0] == 0 && this.O[1] == 0) {
               var2.e().setCenterVertically(false);
               break;
            }

            var2.e().setCenterVertically(true);
            break;
         case 157:
            this.a(var1);
            String var14 = "Z_" + com.aspose.cells.b.a.zv.a(com.aspose.cells.b.a.zr.a(var2.n), "-", "_") + "_.wvu.FilterData";
            Name var15 = this.d.getNames().a(var14, this.g.getIndex());
            if (var15 != null) {
               var2.b().a(var15);
            }
            break;
         case 158:
            this.a(var1);
            this.a(0, (AutoFilter)var2.b());
            break;
         case 160:
            this.a(var1);
            int var12 = com.aspose.cells.b.a.zc.e(this.O, 0);
            int var13 = com.aspose.cells.b.a.zc.e(this.O, 2);
            var2.c((var12 & '\uffff') * 100 / (var13 & '\uffff'));
            break;
         case 161:
            this.a(var1);
            var2.e().b(this.O);
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') == 2204) {
               this.a(var2.e(), var1, var2.n.a());
            } else {
               var1.a(-2);
            }
            break;
         case 427:
            this.M = var1.b(this.N);
            var1.a(this.M & '\uffff');
            return;
         case 2146:
            this.a(var1, var2);
            break;
         case 2150:
            this.a(var1, var2.e());
            break;
         case 2187:
            this.b(var1, var2);
            break;
         default:
            this.M = var1.b(this.N);
            var1.a(this.M & '\uffff');
         }
      }
   }

   void e(zpb var1) throws Exception {
      this.L = var1.b(this.N);
      this.a(var1, this.L & '\uffff');
   }

   void a(zpb var1, int var2) throws Exception {
      this.a(var1);
      if (this.O != null && this.O.length != 0) {
         byte[] var3 = new byte[this.O.length + 4];
         System.arraycopy(com.aspose.cells.b.a.zc.a(var2), 0, var3, 0, 2);
         System.arraycopy(com.aspose.cells.b.a.zc.a(this.O.length), 0, var3, 2, 2);
         System.arraycopy(this.O, 0, var3, 4, this.O.length);
         this.O = var3;
      } else {
         this.O = new byte[4];
         System.arraycopy(com.aspose.cells.b.a.zc.a(var2), 0, this.O, 0, 2);
      }

   }

   private void ag(zpb var1) throws Exception {
      if ((this.a & 16) == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         ConditionalFormattingCollection var2 = this.g.getConditionalFormattings();
         FormatConditionCollection var3 = null;
         int var4 = var2.add();
         var3 = var2.get(var4);
         byte var5 = 12;
         int var6 = com.aspose.cells.b.a.zc.e(this.O, var5) & '\uffff';
         var3.c = (this.O[14] & 255 & 1) != 0;
         int var7 = (com.aspose.cells.b.a.zc.e(this.O, var5 + 2) & '\uffff') >> 1;
         this.H.put(var7, var4);
         int var11 = var5 + 12;
         int var8 = Math.min(com.aspose.cells.b.a.zc.e(this.O, var11) & '\uffff', ((this.M & '\uffff') - var11 - 2) / 8);
         var11 += 2;

         int var9;
         for(var9 = 0; var9 < var8; ++var9) {
            CellArea var10 = new CellArea();
            var10.StartRow = com.aspose.cells.b.a.zc.e(this.O, var11) & '\uffff';
            var10.EndRow = com.aspose.cells.b.a.zc.e(this.O, var11 + 2) & '\uffff';
            var10.StartColumn = com.aspose.cells.b.a.zc.e(this.O, var11 + 4) & '\uffff';
            var10.EndColumn = com.aspose.cells.b.a.zc.e(this.O, var11 + 6) & '\uffff';
            com.aspose.cells.b.a.a.ze.a(var3.b, (Object)var10);
            var11 += 8;
         }

         for(var9 = 0; var9 < var6; ++var9) {
            this.L = var1.b(this.N);
            if ((this.L & '\uffff') != 2170) {
               var1.a(-2);
               break;
            }

            FormatCondition var12 = new FormatCondition(var3);
            var3.a(var12);
            this.a(var1, var12);
         }

      }
   }

   private int a(int var1, Style var2, int var3) throws Exception {
      int var4 = a(this.O, var1, var2);
      int var6 = var4 - var1;
      if (var3 == var6) {
         return var4;
      } else {
         var4 += 6;
         var6 = com.aspose.cells.b.a.zc.e(this.O, var4) & '\uffff';
         var4 += 2;
         int[] var7 = new int[]{var4};
         zbvr var8 = this.a(this.O, var7, var6);
         var4 = var7[0];
         var8.b(var2);
         return var4;
      }
   }

   private int a(int var1, Style var2) throws Exception {
      int var4 = com.aspose.cells.b.a.zc.e(this.O, var1) & '\uffff';
      int var5 = var4;
      int var3 = var1 + 4;
      if (var4 == 0) {
         var3 += 2;
         return var3;
      } else {
         int var7 = var3;
         var3 = a(this.O, var3, var2);
         var4 -= var3 - var7;
         if (var4 == 0) {
            return var3;
         } else {
            var3 += 6;
            var4 = com.aspose.cells.b.a.zc.e(this.O, var3) & '\uffff';
            var3 += 2;
            int[] var8 = new int[]{var3};
            zbvr var9 = this.a(this.O, var8, var4);
            var3 = var8[0];
            var9.b(var2);
            if (var1 + 4 + var5 != var3) {
               var3 = var1 + 6 + var5;
            }

            return var3;
         }
      }
   }

   private void a(zpb var1, FormatCondition var2) throws Exception {
      this.a(var1);
      var2.b = zsk.c(this.O[13]);
      byte var3 = 18;
      int var6 = this.a(var3, (Style)var2.getStyle());
      int var4 = com.aspose.cells.b.a.zc.e(this.O, 14) & '\uffff';
      byte[] var5;
      if (var4 != 0) {
         var5 = new byte[var4 + 2];
         System.arraycopy(com.aspose.cells.b.a.zc.a(var4), 0, var5, 0, 2);
         System.arraycopy(this.O, var6, var5, 2, var4);
         var2.a(var5);
      }

      var6 += var4;
      var4 = com.aspose.cells.b.a.zc.e(this.O, 16) & '\uffff';
      if (var4 != 0) {
         var5 = new byte[var4 + 2];
         System.arraycopy(com.aspose.cells.b.a.zc.a(var4), 0, var5, 0, 2);
         System.arraycopy(this.O, var6, var5, 2, var4);
         var2.b(var5);
      }

      var6 += var4;
      var4 = com.aspose.cells.b.a.zc.e(this.O, var6) & '\uffff';
      var6 += 2 + var4;
      var2.setStopIfTrue((this.O[var6] & 255 & 2) != 0);
      ++var6;
      var2.setPriority(com.aspose.cells.b.a.zc.e(this.O, var6));
      var6 += 2;
      if (var2.getPriority() > var2.a.e.e()) {
         var2.a.e.a(var2.getPriority() + 1);
      }

      switch(this.O[12]) {
      case 1:
         var2.c = 0;
         break;
      case 2:
         var2.c = 1;
      }

      int var7 = com.aspose.cells.b.a.zc.e(this.O, var6) & '\uffff';
      var6 += 2;
      this.a(var2, var7, var6, true, this.O[12] & 255);
   }

   private void a(FormatCondition var1, int var2, int var3, boolean var4, int var5) {
      int var6;
      String var7;
      int var9;
      Top10 var13;
      IconSet var14;
      DataBar var17;
      ColorScale var19;
      var6 = var3 + 1;
      label169:
      switch(var2) {
      case 0:
         if (var1.c != 1) {
            var1.c = 0;
         }
         break;
      case 1:
         var1.c = 1;
         break;
      case 2:
         var1.c = 2;
         var19 = new ColorScale(this.d.n(), var1);
         var1.a(var19);
         break;
      case 3:
         var1.c = 3;
         var17 = new DataBar(this.d.n(), var1);
         var1.a(var17);
         break;
      case 4:
         var1.c = 4;
         var14 = new IconSet(var1);
         var1.a(var14);
         break;
      case 5:
         var1.c = 5;
         var13 = new Top10();
         var1.a(var13);
         var13.setBottom((this.O[var6] & 255 & 1) == 0);
         var13.setPercent((this.O[var6] & 255 & 2) != 0);
         var13.setRank(com.aspose.cells.b.a.zc.e(this.O, var6 + 1));
      case 6:
      case 13:
      case 14:
      case 28:
      default:
         break;
      case 7:
         var1.c = 6;
         break;
      case 8:
         String var8;
         switch(this.O[var6]) {
         case 0:
         case 1:
            var7 = null;
            if (var1.a() != null) {
               var8 = var1.getFormula1();
               if (var8 != null) {
                  String var15 = var8.toUpperCase();
                  int var10 = var15.indexOf("SEARCH(");
                  if (var10 != -1) {
                     int var11 = var15.indexOf(44, var10);
                     if (var11 != -1) {
                        var7 = "=" + var8.substring(var10 + 7, var10 + 7 + (var11 - (var10 + 7)));
                     }
                  }
               }
            }

            if (var7 != null) {
               var1.setText(var7);
               switch(this.O[var6]) {
               case 0:
                  var1.c = 8;
                  break label169;
               case 1:
                  var1.c = 9;
               }
            }
            break label169;
         case 2:
         case 3:
            var7 = null;
            if (var1.a() != null) {
               var8 = var1.getFormula1();
               if (var8 != null) {
                  var9 = var8.lastIndexOf("=");
                  if (var9 > 1) {
                     var7 = var8.substring(var9);
                  }
               }
            }

            if (var7 != null) {
               var1.setText(var7);
               switch(this.O[var6]) {
               case 2:
                  var1.c = 10;
                  break label169;
               case 3:
                  var1.c = 11;
               }
            }
         default:
            break label169;
         }
      case 9:
         var1.c = 12;
         break;
      case 10:
         var1.c = 13;
         break;
      case 11:
         var1.c = 14;
         break;
      case 12:
         var1.c = 15;
         break;
      case 15:
         var1.c = 16;
         var1.setTimePeriod(0);
         break;
      case 16:
         var1.c = 16;
         var1.setTimePeriod(2);
         break;
      case 17:
         var1.c = 16;
         var1.setTimePeriod(1);
         break;
      case 18:
         var1.c = 16;
         var1.setTimePeriod(3);
         break;
      case 19:
         var1.c = 16;
         var1.setTimePeriod(5);
         break;
      case 20:
         var1.c = 16;
         var1.setTimePeriod(6);
         break;
      case 21:
         var1.c = 16;
         var1.setTimePeriod(7);
         break;
      case 22:
         var1.c = 16;
         var1.setTimePeriod(9);
         break;
      case 23:
         var1.c = 16;
         var1.setTimePeriod(8);
         break;
      case 24:
         var1.c = 16;
         var1.setTimePeriod(4);
         break;
      case 25:
         var1.c = 17;
         var1.getAboveAverage().setAboveAverage(true);
         var1.getAboveAverage().setEqualAverage(false);
         var1.getAboveAverage().setStdDev(com.aspose.cells.b.a.zc.e(this.O, var6));
         break;
      case 26:
         var1.c = 17;
         var1.getAboveAverage().setAboveAverage(false);
         var1.getAboveAverage().setEqualAverage(false);
         var1.getAboveAverage().setStdDev(com.aspose.cells.b.a.zc.e(this.O, var6));
         break;
      case 27:
         var1.c = 7;
         break;
      case 29:
         var1.c = 17;
         var1.getAboveAverage().setAboveAverage(true);
         var1.getAboveAverage().setEqualAverage(true);
         var1.getAboveAverage().setStdDev(com.aspose.cells.b.a.zc.e(this.O, var6));
         break;
      case 30:
         var1.c = 17;
         var1.getAboveAverage().setAboveAverage(false);
         var1.getAboveAverage().setEqualAverage(true);
         var1.getAboveAverage().setStdDev(com.aspose.cells.b.a.zc.e(this.O, var6));
      }

      var6 += 16;
      if (var4) {
         int var12;
         ConditionalFormattingValue var18;
         switch(var5) {
         case 3:
            var7 = null;
            if (var1.getType() != 2) {
               var1.c = 2;
               var19 = new ColorScale(this.d.n(), var1);
               var1.a(var19);
            } else {
               var19 = var1.getColorScale();
            }

            var12 = this.O[var6 + 3] & 255;
            var6 += 6;

            for(var9 = 0; var9 < var12; ++var9) {
               ConditionalFormattingValue var20 = new ConditionalFormattingValue(var1);
               var6 = this.a(var6, var20);
               if (var9 == 0) {
                  var19.a = var20;
               } else if (var9 == 2) {
                  var19.c = var20;
               } else if (var12 == 2) {
                  var19.c = var20;
               } else {
                  var19.b = var20;
               }

               var6 += 8;
            }

            for(var9 = 0; var9 < var12; ++var9) {
               var6 += 8;
               zakp var22 = this.a(this.O, var6);
               var6 += 16;
               if (var9 == 0) {
                  var19.d = var22;
               } else if (var9 == 2) {
                  var19.f = var22;
               } else if (var12 == 2) {
                  var19.f = var22;
               } else {
                  var19.e = var22;
               }
            }

            return;
         case 4:
            var7 = null;
            if (var1.getType() != 3) {
               var1.c = 3;
               var17 = new DataBar(this.d.n(), var1);
               var1.a(var17);
            } else {
               var17 = var1.getDataBar();
            }

            var6 += 3;
            var17.setShowValue((this.O[var6] & 255 & 2) == 0);
            ++var6;
            var17.setMinLength(this.O[var6]);
            var17.setMaxLength(this.O[var6 + 1]);
            var6 += 2;
            var17.b(this.a(this.O, var6));
            var6 += 16;
            ConditionalFormattingValue var16 = new ConditionalFormattingValue(var1);
            var6 = this.a(var6, var16);
            var18 = new ConditionalFormattingValue(var1);
            this.a(var6, var18);
            var17.a(var18);
            var17.b(var16);
            break;
         case 5:
            if (var1.getType() != 5) {
               var1.c = 5;
               var13 = new Top10();
               var1.a(var13);
            }

            var6 += 2;
            ++var6;
            var1.getTop10().setBottom((this.O[var6] & 255 & 1) == 0);
            var1.getTop10().setPercent((this.O[var6] & 255 & 2) != 0);
            ++var6;
            var1.getTop10().setRank(com.aspose.cells.b.a.zc.e(this.O, var6));
            var6 += 2;
            break;
         case 6:
            if (var1.getType() != 4) {
               var1.c = 4;
               var14 = new IconSet(var1);
               var1.a(var14);
            }

            var6 += 3;
            int var21 = this.O[var6] & 255;
            ++var6;
            var1.getIconSet().a(zsk.e(this.O[var6] & 255));
            ++var6;
            var1.getIconSet().setShowValue((this.O[var6] & 255 & 1) == 0);
            var1.getIconSet().setReverse((this.O[var6] & 255 & 4) != 0);
            ++var6;

            for(var12 = 0; var12 < var21; ++var12) {
               var18 = new ConditionalFormattingValue(var1);
               var1.getIconSet().getCfvos().a(var18);
               var6 = this.a(var6, var18);
               var18.setGTE(this.O[var6] == 1);
               var6 += 5;
            }
         }
      }

   }

   private zakp a(byte[] var1, int var2) {
      zakp var3 = new zakp(false);
      boolean var4 = false;
      byte var5;
      switch(var1[var2]) {
      case 0:
         var4 = false;
         break;
      case 1:
         var5 = 3;
         var3.a(var5, com.aspose.cells.b.a.zc.a(var1, var2 + 4));
         break;
      case 2:
         var4 = true;
         var3.a(2, Color.fromArgb(this.O[var2 + 7] & 255, this.O[var2 + 4] & 255, this.O[var2 + 5] & 255, this.O[var2 + 6] & 255).toArgb());
         break;
      case 3:
         var5 = 4;
         var3.a(var5, com.aspose.cells.b.a.zc.a(var1, var2 + 4));
         break;
      case 4:
         return var3;
      }

      var3.a(com.aspose.cells.b.a.zc.f(var1, var2 + 8));
      return var3;
   }

   private int a(int var1, ConditionalFormattingValue var2) {
      switch(this.O[var1]) {
      case 1:
         var2.setType(3);
         return this.b(var1 + 1, var2);
      case 2:
         var2.setType(2);
         return var1 + 3;
      case 3:
         var2.setType(1);
         return var1 + 3;
      case 4:
         var2.setType(4);
         return this.b(var1 + 1, var2);
      case 5:
         var2.setType(5);
         return this.b(var1 + 1, var2);
      case 6:
      default:
         return var1;
      case 7:
         var2.setType(0);
         return this.b(var1 + 1, var2);
      }
   }

   private int b(int var1, ConditionalFormattingValue var2) {
      int var3 = com.aspose.cells.b.a.zc.e(this.O, var1) & '\uffff';
      if (var3 != 0) {
         byte[] var4 = new byte[(com.aspose.cells.b.a.zc.e(this.O, var1) & '\uffff') + 2];
         System.arraycopy(this.O, var1, var4, 0, var4.length);
         var2.a(var4);
         return var1 + var4.length;
      } else {
         var2.a(com.aspose.cells.b.a.zc.f(this.O, var1 + 2));
         return var1 + 10;
      }
   }

   private void ah(zpb var1) throws Exception {
      if ((this.a & 16) == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         int var2 = com.aspose.cells.b.a.zc.e(this.O, 16) & '\uffff';
         if (this.H.get(var2) != null) {
            var2 = (Integer)this.H.get(var2);
            FormatConditionCollection var3 = this.g.getConditionalFormattings().get(var2);
            if (this.O[12] == 0) {
               byte var8 = 18;
               int var5 = com.aspose.cells.b.a.zc.e(this.O, var8) & '\uffff';
               if (var5 < 0 || var5 >= var3.getCount()) {
                  return;
               }

               int var9 = var8 + 2;
               FormatCondition var6 = var3.get(var5);
               var6.b = zsk.c(this.O[var9]);
               ++var9;
               int var7 = this.O[var9] & 255;
               ++var9;
               var6.setPriority(com.aspose.cells.b.a.zc.e(this.O, var9));
               if (var6.getPriority() > var3.e.e()) {
                  var3.e.a(var6.getPriority() + 1);
               }

               var9 += 2;
               if ((this.O[var9] & 255 & 1) == 0) {
                  return;
               }

               var6.setStopIfTrue((this.O[var9] & 255 & 2) != 0);
               if (this.O[var9 + 1] != 0) {
                  var9 += 2;
                  var9 = this.a(var9, var6.getStyle());
               } else {
                  var9 += 2;
               }

               this.a(var6, var7, var9, false, 0);
            } else {
               this.L = var1.b(this.N);
               if ((this.L & '\uffff') != 2170) {
                  var1.a(-2);
               } else {
                  FormatCondition var4 = new FormatCondition(var3);
                  this.a(var1, var4);
                  var3.a(var4);
               }
            }

         }
      }
   }

   private void ai(zpb var1) throws Exception {
      if ((this.a & 16) == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         ConditionalFormattingCollection var2 = this.g.getConditionalFormattings();
         FormatConditionCollection var3 = null;
         int var4 = var2.add();
         var3 = var2.get(var4);
         var3.a(this.O, this.M & '\uffff');
         this.H.put((com.aspose.cells.b.a.zc.e(this.O, 2) & '\uffff') >> 1, var4);

         while(true) {
            this.L = var1.b(this.N);
            switch(this.L) {
            case 432:
               this.a(var1);
               var4 = var2.add();
               var3 = var2.get(var4);
               var3.a(this.O, this.M & '\uffff');
               this.H.put((com.aspose.cells.b.a.zc.e(this.O, 2) & '\uffff') >> 1, var4);
               break;
            case 433:
               this.a(var1);
               if (var3 == null) {
                  var3 = var2.get(var2.getCount() - 1);
               }

               FormatCondition var5 = new FormatCondition(var3);
               var5.a(this.O, this.M & '\uffff');
               var5.setPriority(var3.e.e());
               var3.e.a(var3.e.e() + 1);
               var5.setStopIfTrue(true);
               var3.a(var5);
               break;
            default:
               var1.a(-2);
               return;
            }
         }
      }
   }

   private void a(zpb var1, PaneCollection var2) throws Exception {
      this.a(var1);
      var2.c(com.aspose.cells.b.a.zc.e(this.O, 2));
      var2.d(com.aspose.cells.b.a.zc.e(this.O, 0));
      var2.a(com.aspose.cells.b.a.zc.e(this.O, 4));
      var2.b(com.aspose.cells.b.a.zc.e(this.O, 6));
      var2.a(this.O[8]);
   }

   private void aj(zpb var1) throws Exception {
      if ((this.a & 8) == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         int var2 = com.aspose.cells.b.a.zc.e(this.O, 0);
         zani var3 = this.f.q();

         for(int var4 = 0; var4 < (var2 & '\uffff'); ++var4) {
            CellArea var5 = new CellArea();
            var5.StartRow = com.aspose.cells.b.a.zc.e(this.O, 8 * var4 + 2) & '\uffff';
            var5.EndRow = com.aspose.cells.b.a.zc.e(this.O, 8 * var4 + 4) & '\uffff';
            var5.StartColumn = this.O[8 * var4 + 6] & 255;
            var5.EndColumn = this.O[8 * var4 + 8] & 255;
            var3.a(var5);
         }

      }
   }

   private void ak(zpb var1) throws Exception {
      if (this.i || this.a != 0) {
         for(int var2 = 0; var2 < this.d.getCount(); ++var2) {
            this.d.n().l();
            Object var3 = this.Q.get((int)var1.b());
            if (var3 != null) {
               this.g = this.d.get((Integer)var3);
            } else {
               this.g = this.d.get(var2);
            }

            this.f = this.g.getCells();
            this.B = -1;
            this.C = -1;
            this.D = -1;
            this.r.clear();
            if (this.g.getType() == 2) {
               this.E = this.f.getRows();
               this.u = this.f.f();
               Chart var4 = new Chart(this.g);
               this.g.getCharts().a(var4);
               this.a(2057, (zpb)var1);
               var1.a(-2);
               zjn var5 = new zjn(this, var1, this.d, this.g);
               var5.a(var4);
            } else {
               if (this.i) {
                  this.f.a(128, 128, 16);
               } else {
                  this.f.a(4096, 4096, 64);
               }

               this.O(var1);
               this.u.a(-10, 0, 0, 0);
               this.f.g();
               this.f.a((short)this.D);
            }
         }

      }
   }

   static com.aspose.cells.b.a.d.zh a(zvh var0) throws Exception {
      com.aspose.cells.b.a.d.zh var1 = var0.a().a("Workbook");
      if (var1 == null) {
         var1 = var0.a().a("WORKBOOK");
      }

      if (var1 == null) {
         var1 = var0.a().a("Book");
         if (var1 != null) {
            byte[] var2 = new byte[6];
            var1.a(var2, 0, var2.length);
            if (var2[0] != 9 || var2[1] != 8 || var2[2] != 16 || var2[3] != 0 || var2[4] != 0 || var2[5] != 6) {
               return null;
            }

            var1.a(-6L, 1);
         }
      }

      return var1;
   }

   void b(zvh var1) throws Exception {
      this.b = var1;
      com.aspose.cells.b.a.d.zh var2 = var1.a().a("Workbook");
      if (var2 == null) {
         var2 = var1.a().a("WORKBOOK");
         var1.a().g("WORKBOOK");
      } else {
         var1.a().g("Workbook");
      }

      if (var2 == null) {
         var2 = var1.a().a("Book");
         if (var2 == null) {
            return;
         }

         byte[] var3 = new byte[6];
         var2.a(var3, 0, var3.length);
         if (var3[0] != 9 || var3[1] != 8 || var3[2] != 16 || var3[3] != 0 || var3[4] != 0 || var3[5] != 6) {
            throw new CellsException(19, "This Excel files contains BIFF7(Excel95 or earlier file format) records.");
         }

         var1.a().g("Book");
         var2.a(-6L, 1);
      }

      this.a(var2);
      if (var2.h() > 20000000L) {
         var2 = null;
         com.aspose.cells.b.a.zg.a();
         com.aspose.cells.b.a.zg.b();
      } else {
         var2 = null;
      }

      Iterator var16 = this.d.U().iterator();

      while(var16.hasNext()) {
         zauk var4 = (zauk)var16.next();
         if (var4.D != null && var4.D.length() != 0) {
            Name var5 = this.d.getNames().get(var4.D);
            if (var5 != null) {
               Range var6 = var5.getRange();
               if (var6 != null) {
                  zqr var7 = new zqr(var4, var6.getWorksheet(), var6.getRefersTo());
                  var7.b = var6;
                  var7.c = var6;
                  if (var4.e == null) {
                     var4.e = new zqr[1];
                     var4.e[0] = var7;
                  } else {
                     var4.e[0] = var7;
                  }
               }
            }

            this.a(var4);
         }
      }

      for(int var17 = 0; var17 < this.d.getCount(); ++var17) {
         if (this.d.get(var17).k() != null && this.d.get(var17).getOleObjects().getCount() != 0) {
            Iterator var19 = this.d.get(var17).getOleObjects().iterator();

            while(var19.hasNext()) {
               OleObject var21 = (OleObject)var19.next();
               if (var21.s() > this.d.c) {
                  this.d.c = var21.s();
               }

               boolean var25 = var21.i();
               if (var25 && !var21.c()) {
                  String var28 = "MBD" + com.aspose.cells.a.c.zp.e(var21.s());
                  zane var8 = var1.a().b(var28);
                  var21.a(var8.a());
                  com.aspose.cells.b.a.d.zh var9 = null;
                  if (zakq.b(var8)) {
                     var9 = var8.a("\u0001Ole10Native");
                     var21.b(true);
                  } else if (zakq.a(var8)) {
                     boolean var10 = false;
                     var21.setFileFormatType(FileFormatUtil.a((String)null, (com.aspose.cells.b.a.d.zm)null, var8).getFileFormatType());
                     com.aspose.cells.b.a.zh var11;
                     if (var21.getFileFormatType() == 33) {
                        if (var8.b("MAPIMessage") != null) {
                           var11 = var8.a();
                           var8 = var8.b("MAPIMessage");
                           var8.a(var11);
                        }
                     } else if (var21.getFileFormatType() == 255 && var8.a("Package") != null) {
                        var11 = var8.a();
                        var9 = var8.a("Package");
                        int var12 = FileFormatUtil.a((com.aspose.cells.b.a.d.zm)var9).getFileFormatType();
                        var21.setFileFormatType(var12);
                        var10 = FileFormatUtil.d(var12);
                     }

                     if (!var10) {
                        zvh var30 = new zvh(var8);
                        var9 = new com.aspose.cells.b.a.d.zh();
                        var30.a((com.aspose.cells.b.a.d.zm)var9);
                     }
                  } else {
                     var9 = var8.a("CONTENTS");
                     var8.g("CONTENTS");
                  }

                  if (var9 != null) {
                     var1.a().g(var28);
                     var21.a(false);
                     if (var21.k()) {
                        var21.a(var9);
                     } else {
                        var21.setObjectData(var9.o());
                     }
                  }
               }
            }
         }
      }

      List var18 = var1.a().d();

      for(int var20 = 0; var20 < var18.size(); ++var20) {
         String var23 = (String)var18.get(var20);
         if (var23.startsWith("MBD")) {
            int var26 = com.aspose.cells.b.a.ze.b(var23.substring(3), 16);
         }
      }

      var2 = var1.a().a("User Names");
      if (var2 != null) {
         this.c.getSettings().setShared(true);
      }

      if (this.a == 65535) {
         var2 = var1.a().a("XML");
         if (var2 != null) {
            var1.a().g("XML");
            String var22 = Encoding.getUTF8().a(var2.m());
            zcfw var24 = null;

            try {
               var24 = zasr.a(var2);
               zoz var27 = new zoz(this.d.n());
               zakb var29 = new zakb(var27);
               var29.a(var24);
            } finally {
               if (var24 != null) {
                  var24.c();
               }

            }
         }
      }

   }

   private void a(zauk var1) {
      String var2 = var1.D;
      boolean var3 = false;
      Range var4 = null;
      int var5 = this.d.getCount();
      boolean var6 = false;
      Worksheet var7 = null;
      ListObject var8 = null;

      for(int var9 = 0; var9 < var5 && !var3; ++var9) {
         var7 = this.d.get(var9);
         int var18 = var7.getListObjects().getCount();

         for(int var10 = 0; var10 < var18; ++var10) {
            var8 = var7.getListObjects().get(var10);
            if (var2.toUpperCase().equals(var8.getDisplayName().toUpperCase())) {
               var4 = var7.getCells().createRange(var8.getStartRow(), var8.getStartColumn(), var8.getEndRow() - var8.getStartRow() + 1, var8.getEndColumn() - var8.getStartColumn() + 1);
               var4.a(var8.getDisplayName());
               var3 = true;
               break;
            }

            if (var2.length() >= var8.getDisplayName().length() && var2.indexOf(58) != -1 && var2.endsWith("]")) {
               String var11 = com.aspose.cells.b.a.zv.a(com.aspose.cells.b.a.zv.a(var2, "'[", "["), "']", "]");
               String var12 = var11.substring(0, 0 + var8.getDisplayName().length());
               if (com.aspose.cells.b.a.zv.b(var12, var8.getDisplayName())) {
                  int var13 = var11.indexOf(58);
                  String var14 = var11.substring(var12.length() + 2, var12.length() + 2 + (var13 - var12.length() - 3));
                  String var15 = var11.substring(var13 + 2, var13 + 2 + (var11.length() - var13 - 4));
                  int var16 = var8.getListColumns().a(var14);
                  int var17 = var8.getListColumns().a(var15);
                  if (var16 != -1 && var17 != -1) {
                     var4 = var7.getCells().createRange(var8.getStartRow(), var16, var8.getEndRow() - var8.getStartRow() + 1, var17 + 1);
                     var4.a(var2);
                     var3 = true;
                     break;
                  }
               }
            }
         }
      }

      if (var3) {
         zqr var19 = new zqr(var1, var4.getWorksheet(), var4.getRefersTo());
         var19.b = var4;
         var19.c = var4;
         if (var1.e == null) {
            var1.e = new zqr[1];
            var1.e[0] = var19;
         }
      }

   }

   private void a(com.aspose.cells.b.a.d.zm var1, zvh var2, zbw var3) throws Exception {
      zsh var4 = new zsh();
      long var5 = var1.i();
      var4.a(var1, var3);
      var1.b(var5);
      zane var7 = var2.a().b("_SX_DB_CUR");
      if (var7 != null) {
         for(int var8 = 0; var8 < var7.b(); ++var8) {
            com.aspose.cells.b.a.d.zh var9 = (com.aspose.cells.b.a.d.zh)var7.b(var8);
            var4.a(var9, (zbw)var3);
            var9.b(0L);
         }

      }
   }

   private void a(com.aspose.cells.b.a.d.zm var1, zvh var2, zsg var3) throws Exception {
      zsh var4 = new zsh();
      long var5 = var1.i();
      var4.a(var1, var3);
      var1.b(var5);
      zane var7 = var2.a().b("_SX_DB_CUR");
      if (var7 != null) {
         for(int var8 = 0; var8 < var7.b(); ++var8) {
            com.aspose.cells.b.a.d.zh var9 = (com.aspose.cells.b.a.d.zh)var7.b(var8);
            var4.a(var9, (zsg)var3);
            var9.b(0L);
         }

      }
   }

   private void a(com.aspose.cells.b.a.d.zm var1, zvh var2, zby var3) throws Exception {
      zsh var4 = new zsh();
      long var5 = var1.i();
      var4.a(var1, var3);
      var1.b(var5);
      zane var7 = var2.a().b("_SX_DB_CUR");
      if (var7 != null) {
         for(int var8 = 0; var8 < var7.b(); ++var8) {
            com.aspose.cells.b.a.d.zh var9 = (com.aspose.cells.b.a.d.zh)var7.b(var8);
            var4.a(var9, (zby)var3);
            var9.b(0L);
         }
      }

      com.aspose.cells.b.a.d.zh var10 = var2.a().a("encryption");
      if (var10 != null) {
         zse.a(var10, var2, var3);
         var2.a().g("encryption");
      }

   }

   zvh a(com.aspose.cells.b.a.d.zm var1) throws Exception {
      this.T = new zvh(var1);
      this.b(this.T);
      return this.T;
   }

   void c(zvh var1) throws Exception {
      this.T = var1;
      this.b(var1);
      zane var2 = var1.a().b("_VBA_PROJECT_CUR");
      if (var2 != null) {
         this.d.l = new VbaProject(this.d.n(), var2, (String)null);
         var1.a().g("_VBA_PROJECT_CUR");
      }

      try {
         a(this.b, this.d);
      } catch (Exception var4) {
         ;
      }

   }

   static void a(zvh var0, WorksheetCollection var1) throws Exception {
      BuiltInDocumentPropertyCollection var2 = var1.getBuiltInDocumentProperties();
      CustomDocumentPropertyCollection var3 = var1.getCustomDocumentProperties();
      zrq.a(var0, var2, var3);
      DocumentProperty var4;
      if (var2.contains("Version")) {
         var4 = var2.get("Version");
         if (var4.getType() == 3) {
            int var5 = var4.toInt();
            var4.setValue(com.aspose.cells.a.c.zp.a((var5 & -65536) >> 16, 2) + "." + com.aspose.cells.a.c.zp.a(var5 & '\uffff', 4));
         }
      }

      if (var3.contains("_PID_LINKBASE")) {
         var4 = var3.get("_PID_LINKBASE");
         if (var4.getValue() instanceof byte[]) {
            byte[] var18 = (byte[])((byte[])var4.getValue());
            var2.setHyperlinkBase(Encoding.getUnicode().a(var18, 0, var18.length - 2));
         } else {
            var2.setHyperlinkBase(com.aspose.cells.b.a.zr.a(var4));
         }

         var3.remove("_PID_LINKBASE");
      }

      if (var3.contains("_PID_HLINKS")) {
         var4 = var3.get("_PID_HLINKS");
         Encoding var19 = Encoding.getUnicode();
         if (var4.getValue() instanceof byte[]) {
            byte[] var6 = (byte[])((byte[])var4.getValue());
            int var7 = 4;
            Iterator var8 = var1.iterator();

            while(var8.hasNext()) {
               Worksheet var9 = (Worksheet)var8.next();

               for(int var10 = 0; var10 < var9.getHyperlinks().getCount(); ++var10) {
                  while(var7 < var6.length) {
                     var7 += 16;
                     int var11 = com.aspose.cells.b.a.zc.a(var6, var7 + 4);
                     var7 += 8;
                     int var12 = var7 + 6;
                     short var13 = com.aspose.cells.b.a.zc.b(var6, var7 + 6);
                     var7 += 8;
                     var7 += 4;
                     int var14 = com.aspose.cells.b.a.zc.a(var6, var7) * 2;
                     var7 += 4;
                     String var15 = var19.a(var6, var7, var14 - 2);
                     var7 += var14 % 4 != 0 ? var14 / 4 * 4 + 4 : var14;
                     var7 += 4;
                     var14 = com.aspose.cells.b.a.zc.a(var6, var7) * 2;
                     var7 += 4;
                     String var16 = var19.a(var6, var7, var14 - 2);
                     var7 += var14 % 4 != 0 ? var14 / 4 * 4 + 4 : var14;
                     if (var14 > 2) {
                        var15 = var15 + "#" + var16;
                     }

                     if (var11 == 0) {
                        Hyperlink var17 = var9.getHyperlinks().get(var10);
                        if (var13 == 1) {
                           var17.a = var15;
                           var6[var12] = 0;
                        } else if (var13 == 2) {
                           ;
                        }
                        break;
                     }
                  }
               }
            }
         }
      }

   }

   private void a(com.aspose.cells.b.a.d.zh var1) throws Exception {
      zpb var2 = new zpb(var1);
      this.d.t();
      this.b(var2);
      this.e = this.d.B().getCount() - 1;
      int var3 = 0;
      int var6;
      if (this.d.v() != null && this.d.v().getCount() != 0) {
         for(var6 = 0; var6 < this.d.v().getCount(); ++var6) {
            zbqg var5 = this.d.v().a(var6);
            if (var5.e()) {
               var3 = var6;
               break;
            }
         }
      } else {
         this.d.a(new zbqf());
         zbqg var4 = new zbqg();
         var4.a(1);
         this.d.v().a(var4);
         var3 = 0;
      }

      for(var6 = 0; var6 < this.d.getCount(); ++var6) {
         this.d.q().a(var3, var6, var6);
      }

      this.d.getExternalLinks().a(this.d.v());
      this.ak(var2);
      this.k();
   }

   private void k() {
      this.d.g.e();
   }

   private void a(zpb var1, boolean var2) throws Exception {
      this.L = var1.b(this.N);
      if (var2) {
         if ((this.L & '\uffff') != 2150) {
            throw new IOException("File is corrupted");
         }

         this.a(var1);
      } else {
         switch(this.L) {
         case 60:
         case 235:
            this.a(var1);
            break;
         default:
            throw new IOException("File is corrupted");
         }
      }

   }

   private void a(zpb var1, zra var2) throws Exception {
      boolean var3 = false;
      boolean var4 = false;
      boolean var5 = false;
      Object var6 = null;
      this.a(var1);
      byte var7 = 0;
      boolean var8 = var2.a() == 1;
      if (var8) {
         var7 = 14;
      }

      int var34 = com.aspose.cells.b.a.zc.a(this.O, var7 + 4);
      int var9 = var7 + 8;
      boolean var10 = false;
      boolean var11 = false;

      while(true) {
         label201:
         while(var34 > 0) {
            int var33;
            int var35;
            byte[] var36;
            short var37;
            byte var38;
            if (var9 < (this.M & '\uffff') && var9 + 8 > (this.M & '\uffff')) {
               var36 = new byte[8];
               int var12 = (this.M & '\uffff') - var9;
               System.arraycopy(this.O, var9, var36, 0, var12);
               this.a(var1, var8);
               System.arraycopy(this.O, var7, var36, var12, 8 - var12);
               var37 = (short)((com.aspose.cells.b.a.zc.e(var36, 0) & '\uffff') >> 4);
               var38 = (byte)(var36[0] & 255 & 15);
               var35 = com.aspose.cells.b.a.zc.e(var36, 2);
               var33 = com.aspose.cells.b.a.zc.a(var36, 4);
               var9 = var7 + 8 - var12;
            } else {
               if (var9 == (this.M & '\uffff')) {
                  this.a(var1, var8);
                  var9 = var7;
               }

               var37 = (short)((com.aspose.cells.b.a.zc.e(this.O, var9) & '\uffff') >> 4);
               var38 = (byte)(this.O[var9] & 255 & 15);
               var35 = com.aspose.cells.b.a.zc.e(this.O, var9 + 2);
               var33 = com.aspose.cells.b.a.zc.a(this.O, var9 + 4);
               var9 += 8;
            }

            var34 -= var33 + 8;
            int var15;
            switch(var35) {
            case 61441:
               var15 = var33;
               int var40 = var37;
               boolean var41 = true;

               while(true) {
                  while(true) {
                     if (var15 == 0) {
                        continue label201;
                     }

                     if (var41) {
                        if (var9 < (this.M & '\uffff') && var9 + 8 > (this.M & '\uffff')) {
                           var36 = new byte[8];
                           int var18 = (this.M & '\uffff') - var9;
                           System.arraycopy(this.O, var9, var36, 0, var18);
                           this.a(var1, var8);
                           System.arraycopy(this.O, var7, var36, var18, 8 - var18);
                           var37 = (short)((com.aspose.cells.b.a.zc.e(var36, var7) & '\uffff') >> 4);
                           var35 = com.aspose.cells.b.a.zc.e(var36, 2);
                           var33 = com.aspose.cells.b.a.zc.a(var36, 4);
                           var9 = var7 + (8 - var18);
                        } else {
                           if (var9 == (this.M & '\uffff')) {
                              this.a(var1, var8);
                              var9 = var7;
                           }

                           var37 = (short)((com.aspose.cells.b.a.zc.e(this.O, var9) & '\uffff') >> 4);
                           var35 = com.aspose.cells.b.a.zc.e(this.O, var9 + 2);
                           var33 = com.aspose.cells.b.a.zc.a(this.O, var9 + 4);
                           var9 += 8;
                        }
                     }

                     if ((var35 & '\uffff') != 61447) {
                        if (var40 > 0) {
                           throw new IOException("File is corrupted");
                        }

                        var15 -= 8 + var33;
                        if (var33 != 0) {
                           byte[] var43 = new byte[var33];
                           var9 = this.a(var1, var7, var9, var43, 0, var33);
                        }
                     } else {
                        --var40;
                        zcb var42 = null;
                        byte var19 = 0;
                        if (var33 <= 38) {
                           var33 = 36;
                        }

                        var15 -= var33 + 8;
                        var42 = new zcb();
                        var2.b().a(var42);
                        var42.a((byte)var37);
                        byte[] var20 = new byte[var33];
                        var9 = this.a(var1, var7, var9, var20, 0, var33);
                        zux var21 = var42.g();
                        var21.a = var20[var19];
                        var21.b = var20[var19 + 1];
                        boolean var22 = true;

                        for(int var23 = 0; var23 < 16; ++var23) {
                           if (var20[var19 + 2 + var23] != 0) {
                              var22 = false;
                              break;
                           }
                        }

                        int var44 = var19 + 18;
                        var21.d = com.aspose.cells.b.a.zc.b(var20, var44);
                        long var45 = com.aspose.cells.b.a.zc.d(var20, var44 + 2);
                        var44 += 6;
                        var21.e = com.aspose.cells.b.a.zc.a(var20, var44);
                        var44 += 8;
                        var21.f = var20[var44];
                        byte var25 = var20[var44 + 1];
                        var21.g = var20[var44 + 2];
                        var21.h = var20[var44 + 3];
                        var44 += 4;
                        if (var25 != 0) {
                           var44 += var25 & 255;
                        }

                        if (var33 == 36) {
                           if (var22 || (var45 & 4294967295L) <= 8L) {
                              var42.g().c = new byte[16];
                              continue;
                           }

                           var20 = new byte[8];
                           var9 = this.a(var1, var7, var9, var20, 0, 8);
                           int var26 = com.aspose.cells.b.a.zc.e(var20, 2);
                           if ((var26 & '\uffff') == 61447) {
                              var37 = (short)((com.aspose.cells.b.a.zc.e(var20, 0) & '\uffff') >> 4);
                              var35 = var26;
                              var33 = com.aspose.cells.b.a.zc.a(var20, 4);
                              var41 = false;
                              var42.g().c = new byte[16];
                              continue;
                           }

                           var44 = 0;
                           var33 = com.aspose.cells.b.a.zc.a(var20, var44 + 4);
                           var15 -= var33 + 8;
                        }

                        var41 = true;
                        zcv var46 = var42.f();
                        var46.a((short)((com.aspose.cells.b.a.zc.e(var20, var44) & '\uffff') >> 4));
                        var46.a(com.aspose.cells.b.a.zc.e(var20, var44 + 2));
                        var33 = com.aspose.cells.b.a.zc.a(var20, var44 + 4);
                        var44 += 8;
                        if (var20.length == 8) {
                           var20 = new byte[var33];
                           var9 = this.a(var1, var7, var9, var20, 0, var33);
                           var44 = 0;
                        }

                        int var27 = var33 - (var20.length - var44);
                        var15 -= var27;
                        boolean var28 = false;
                        switch(var42.n()) {
                        case 2:
                           var28 = (var46.d() ^ 980) == 1;
                        case 3:
                        case 5:
                        default:
                           break;
                        case 4:
                           var28 = (var46.d() ^ 1346) == 1;
                           break;
                        case 6:
                           var28 = (var46.d() ^ 1760) == 1;
                           break;
                        case 7:
                           var28 = (var46.d() ^ 1960) == 1;
                        }

                        int var29;
                        if (var46.g()) {
                           var44 += 16;
                           if (var28) {
                              var46.a(new byte[16]);
                              System.arraycopy(var20, var44, var46.a(), 0, 16);
                              var44 += 16;
                           }

                           var46.a = com.aspose.cells.b.a.zc.a(var20, var44);
                           var44 += 4;
                           var29 = com.aspose.cells.b.a.zc.a(var20, var44 + 8) - com.aspose.cells.b.a.zc.a(var20, var44);
                           var44 += 16;
                           var42.a((int)((double)(com.aspose.cells.b.a.zc.a(var20, var44) * this.d.L() / 914400) + 0.5D));
                           var42.b((int)((double)(com.aspose.cells.b.a.zc.a(var20, var44 + 4) * this.d.M() / 914400) + 0.5D));
                           if (var42.n() == 3 && var42.k() != 0) {
                              var42.c(var29 * 96 / var42.k());
                           }

                           var44 += 8;
                           var44 += 4;
                           var46.b = var20[var44];
                           var46.c = var20[var44 + 1];
                           var44 += 2;
                        } else {
                           if (var28) {
                              var46.a(new byte[16]);
                              System.arraycopy(var20, var44, var46.a(), 0, 16);
                              var44 += 16;
                           }

                           var46.d = var20[var44 + 16];
                           var44 += 17;
                        }

                        var29 = var20.length - var44;
                        var46.b(new byte[var29 + var27]);
                        System.arraycopy(var20, var44, var46.e(), 0, var29);
                        if (var27 != 0) {
                           var9 = this.a(var1, var7, var9, var46.e(), var29, var27);
                        }

                        byte[] var30 = com.aspose.cells.a.c.zq.a(var46.e());
                        var42.g().c = var30;
                        if (!var42.f().g()) {
                           switch(var42.n()) {
                           case 7:
                              var42.a(com.aspose.cells.b.a.zc.a(var46.e(), 4));
                              var42.b(com.aspose.cells.b.a.zc.a(var46.e(), 8));
                              break;
                           default:
                              try {
                                 int[] var31 = com.aspose.cells.a.c.zn.a(var42.n() == -2, var46.e(), this.d.L());
                                 var42.a(var31[0]);
                                 var42.b(var31[1]);
                              } catch (Exception var32) {
                                 ;
                              }
                           }
                        }
                     }
                  }
               }
            case 61446:
               zqz var39 = var2.d();
               zuy var13 = var39.b();
               var13.a = com.aspose.cells.b.a.zc.a(this.O, var9);
               int var14 = com.aspose.cells.b.a.zc.a(this.O, var9 + 4) - 1;
               var13.b = com.aspose.cells.b.a.zc.a(this.O, var9 + 8);
               var13.c = com.aspose.cells.b.a.zc.a(this.O, var9 + 12);
               var9 += 16;

               for(var15 = 0; var15 < var14; ++var15) {
                  zva var16 = new zva();
                  com.aspose.cells.b.a.a.ze.a(var39.c(), (Object)var16);
                  if (var9 < (this.M & '\uffff') && var9 + 8 > (this.M & '\uffff')) {
                     var36 = new byte[8];
                     int var17 = (this.M & '\uffff') - var9;
                     System.arraycopy(this.O, var9, var36, 0, var17);
                     this.a(var1, var8);
                     System.arraycopy(this.O, var7, var36, var17, 8 - var17);
                     var16.a = com.aspose.cells.b.a.zc.a(var36, 0);
                     var16.b = com.aspose.cells.b.a.zc.a(var36, 4);
                     var9 = var7 + (8 - var17);
                  } else {
                     if (var9 == (this.M & '\uffff')) {
                        this.a(var1, var8);
                        var9 = var7;
                     }

                     var16.a = com.aspose.cells.b.a.zc.a(this.O, var9);
                     var16.b = com.aspose.cells.b.a.zc.a(this.O, var9 + 4);
                     var9 += 8;
                  }

                  if (var16.a > (var39.d() & '\uffff')) {
                     var39.a(var16.a);
                  }
               }
               break;
            default:
               var36 = new byte[8 + var33];
               System.arraycopy(com.aspose.cells.b.a.zc.a((short)(var37 << 4 | var38 & 255)), 0, var36, 0, 2);
               System.arraycopy(com.aspose.cells.b.a.zc.a(var35), 0, var36, 2, 2);
               System.arraycopy(com.aspose.cells.b.a.zc.a(var33), 0, var36, 4, 4);
               var9 = this.a(var1, var7, var9, var36, 8, var33);
               com.aspose.cells.b.a.a.ze.a(var2.e(), (Object)var36);
            }
         }

         return;
      }
   }

   void a(zpb var1, PageSetup var2) throws Exception {
      if ((this.a & 4) == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         int var3 = 14;
         ShapeCollection var4 = null;
         int var6;
         if (this.O[var3 + 2] == 2 && (this.O[var3 + 3] & 255) == 240) {
            int var5 = com.aspose.cells.b.a.zc.b(this.O, var3 + 8) >> 4;
            var4 = new ShapeCollection(this.d, this.g, this.d.S(), var2, var5);
            var2.a(var4);
            var3 += 16;
            var4.c().c().a(com.aspose.cells.b.a.zc.a(this.O, var3));
            var4.c().c().b(com.aspose.cells.b.a.zc.a(this.O, var3 + 4));
            var3 += 16;
            var6 = com.aspose.cells.b.a.zc.a(this.O, var3 + 4);
            var3 += 8 + var6;
         }

         if (var4 == null) {
            var4 = var2.i();
         }

         Picture var14 = null;
         boolean var15 = false;
         int var7 = 1;

         while(true) {
            while(var3 < (this.M & '\uffff')) {
               var6 = com.aspose.cells.b.a.zc.e(this.O, var3 + 2);
               switch(var6) {
               case 61444:
                  var14 = new Picture(var4);
                  var14.a((zanr)null);
                  var14.f(var7++);
                  var4.c(var14);
                  var3 += 8;
                  break;
               case 61450:
                  var14.N().i().a((short)((com.aspose.cells.b.a.zc.e(this.O, var3) & '\uffff') >> 4));
                  var3 += 8;
                  var14.N().i().b(com.aspose.cells.b.a.zc.a(this.O, var3));
                  var14.N().i().c(com.aspose.cells.b.a.zc.a(this.O, var3 + 4));
                  var3 += 8;
                  break;
               case 61451:
                  var14.N().c().a();
                  int var8 = com.aspose.cells.b.a.zc.b(this.O, var3) >> 4;
                  var3 += 8;
                  int var9 = var3 + var8 * 6;
                  boolean var10 = false;
                  boolean var11 = false;

                  for(int var12 = 0; var12 < var8; ++var12) {
                     int var16 = com.aspose.cells.b.a.zc.e(this.O, var3);
                     int var17 = com.aspose.cells.b.a.zc.a(this.O, var3 + 2);
                     if ((var16 & '\uffff' & '耀') != 0) {
                        if (var17 != 0) {
                           byte[] var13 = new byte[var17];
                           System.arraycopy(this.O, var9, var13, 0, var17);
                           var14.N().c().a(var16, 4, var13);
                           var9 += var17;
                        }
                     } else {
                        var14.N().c().a(var16, 0, var17);
                     }

                     var3 += 6;
                  }

                  var3 = var9;
                  break;
               case 61456:
                  var3 += 8;
                  var14.a(0, false, 0, 0, com.aspose.cells.b.a.zc.a(this.O, var3), com.aspose.cells.b.a.zc.a(this.O, var3 + 4));
                  var3 += 8;
                  break;
               default:
                  var3 += 8 + com.aspose.cells.b.a.zc.a(this.O, var3 + 4);
               }
            }

            return;
         }
      }
   }

   private int a(zpb var1, int var2, int var3, byte[] var4, int var5, int var6) throws Exception {
      if (var3 + var6 <= (this.M & '\uffff')) {
         System.arraycopy(this.O, var3, var4, var5, var6);
         var3 += var6;
         return var3;
      } else {
         boolean var7 = false;

         int var8;
         int var9;
         for(var8 = var6 + var5; var8 - var5 > (this.M & '\uffff') - var3; var3 = var2) {
            var9 = (this.M & '\uffff') - var3;
            System.arraycopy(this.O, var3, var4, var5, var9);
            var5 += var9;
            this.a(var1, var2 != 0);
         }

         var9 = var8 - var5;
         System.arraycopy(this.O, var3, var4, var5, var9);
         var3 += var9;
         return var3;
      }
   }

   private zakp b(byte[] var1, int var2) {
      zakp var3 = new zakp(false);
      double var4 = (double)com.aspose.cells.b.a.zc.b(var1, var2 + 2) * 1.0D / 32767.0D;
      var3.a(var4);
      switch(var1[var2]) {
      case 0:
         var3.a(true);
         break;
      case 1:
         int var6 = com.aspose.cells.b.a.zc.a(var1, var2 + 4);
         if (var6 >= 64) {
            var3.a(1, var6);
         } else {
            var3.a(3, var6);
         }
         break;
      case 2:
         int var7 = ((var1[var2 + 4] & 255) << 16) + ((var1[var2 + 5] & 255) << 8) + (var1[var2 + 6] & 255);
         var3.a(2, var7);
         break;
      case 3:
         var3.a(4, com.aspose.cells.b.a.zc.a(var1, var2 + 4));
      }

      return var3;
   }

   private void al(zpb var1) throws Exception {
      if (!this.j) {
         this.h(var1);
      } else {
         this.a(var1);
         int var2 = com.aspose.cells.b.a.zc.e(this.O, 12) & '\uffff';
         if (var2 == 0) {
            int var3 = com.aspose.cells.b.a.zc.e(this.O, 14) & '\uffff';
            int var4 = com.aspose.cells.b.a.zc.e(this.O, 18) & '\uffff';
            byte var5 = 20;
            int[] var6 = new int[]{var5};
            zbvr var7 = this.a(this.O, var6, var4);
            int var8 = var6[0];
            this.U.put(var3, var7);
         }
      }
   }

   private zbvr a(byte[] var1, int[] var2, int var3) {
      zbvr var4 = new zbvr();

      for(int var5 = 0; var5 < var3 && var2[0] < var1.length; ++var5) {
         zbvp var7;
         int var8;
         int var6 = var1[var2[0]] & 255;
         var7 = new zbvp();
         var7.a = var6;
         var8 = com.aspose.cells.b.a.zc.e(var1, var2[0] + 2) & '\uffff';
         label44:
         switch(var6) {
         case 0:
         case 1:
            var7.b = Color.fromArgb(var1[var2[0] + 4] & 255, var1[var2[0] + 5] & 255, var1[var2[0] + 6] & 255);
            break;
         case 2:
         case 3:
         case 12:
         default:
            var2[0] += var8;
            continue;
         case 4:
         case 5:
         case 7:
         case 8:
         case 9:
         case 10:
         case 11:
         case 13:
            var7.b = this.b(var1, var2[0] + 4);
            break;
         case 6:
            int var9 = var2[0] + 4;
            GradientFill var10 = new GradientFill((Object)null, (Workbook)null);
            var7.b = var10;
            if (var1[var9] == 0) {
               var10.b = new zacn();
               var9 += 4;
               var10.b().a = (int)(com.aspose.cells.b.a.zc.f(var1, var9) * 6000.0D);
               var9 += 8;
               var10.d().b = (int)(com.aspose.cells.b.a.zc.f(var1, var9) * 100000.0D);
               var10.d().e = (int)(com.aspose.cells.b.a.zc.f(var1, var9 + 8) * 100000.0D);
               var10.d().c = (int)(com.aspose.cells.b.a.zc.f(var1, var9 + 16) * 100000.0D);
               var10.d().d = (int)(com.aspose.cells.b.a.zc.f(var1, var9 + 24) * 100000.0D);
               var9 += 32;
            } else {
               var9 += 4;
               var10.b = new zaco();
               var10.c().a = 1;
               var9 += 8;
               var10.c().b = (int)(com.aspose.cells.b.a.zc.f(var1, var9) * 100000.0D);
               var10.c().e = (int)(com.aspose.cells.b.a.zc.f(var1, var9 + 8) * 100000.0D);
               var10.c().c = (int)(com.aspose.cells.b.a.zc.f(var1, var9 + 16) * 100000.0D);
               var10.c().d = (int)(com.aspose.cells.b.a.zc.f(var1, var9 + 24) * 100000.0D);
               var9 += 32;
            }

            int var11 = com.aspose.cells.b.a.zc.a(var1, var9);
            var9 += 4;
            int var12 = 0;

            while(true) {
               if (var12 >= var11) {
                  break label44;
               }

               GradientStop var13 = new GradientStop(var10.getGradientStops());
               var13.a.b(false);
               var10.getGradientStops().a(var13);
               switch(var1[var9]) {
               case 0:
               case 4:
               default:
                  break;
               case 1:
                  var13.a.a(3, com.aspose.cells.b.a.zc.a(var1, var9 + 2));
                  break;
               case 2:
                  int var14 = ((var1[var9 + 2] & 255) << 16) + ((var1[var9 + 3] & 255) << 8) + (var1[var9 + 4] & 255);
                  var13.a.a(2, var14);
                  break;
               case 3:
                  var13.a.a(4, com.aspose.cells.b.a.zc.a(var1, var9 + 2));
               }

               var9 += 6;
               var13.setPosition(com.aspose.cells.b.a.zc.f(var1, var9) * 100.0D);
               var9 += 8;
               var13.a.a(com.aspose.cells.b.a.zc.f(var1, var9));
               var9 += 8;
               ++var12;
            }
         case 14:
            var7.b = var1[var2[0] + 4] & 255;
            break;
         case 15:
            var7.b = com.aspose.cells.b.a.zc.b(var1, var2[0] + 4);
         }

         var2[0] += var8;
         var4.a(var7);
      }

      return var4;
   }

   void a(Border var1, byte[] var2, int var3) {
      boolean var4 = false;
      boolean[] var5 = new boolean[]{var4};
      var1.a = this.a(var2, var3, var5);
      var4 = var5[0];
      var3 += 8;
      var1.setLineStyle(zcee.m(this.O[var3] & 255));
   }

   zakp a(byte[] var1, int var2, boolean[] var3) {
      var3[0] = false;
      zakp var4 = new zakp(false);
      var4.a((double)com.aspose.cells.b.a.zc.b(var1, var2 + 2) / 32767.0D);
      int var5 = (var1[var2] & 255 & 254) >> 1;
      switch(var5) {
      case 0:
         var4.a(true);
         break;
      case 1:
         if ((var1[var2 + 1] & 255) >= 64) {
            var4.a(true);
         } else {
            var4.a(3, var1[var2 + 1] & 255);
         }
         break;
      case 2:
         var2 += 4;
         var4.a(2, ((var1[var2] & 255) << 16) + ((var1[var2 + 1] & 255) << 8) + (var1[var2 + 2] & 255));
         break;
      case 3:
         if ((var1[var2 + 1] & 255) >= 64) {
            var4.a(true);
         } else {
            var4.a(4, var1[var2 + 1] & 255);
         }
         break;
      case 4:
         var3[0] = true;
         break;
      default:
         var4.a(true);
      }

      return var4;
   }

   private void am(zpb var1) throws Exception {
      if ((this.a & 64) == 0 && (this.a & 128) == 0 && (this.a & 16) == 0) {
         this.h(var1);
      } else {
         this.a(var1);
         zbzl var2 = new zbzl(this.d);
         boolean var3 = false;
         boolean var4 = false;
         var2.a = (this.O[12] & 255 & 2) != 0;
         byte var5 = 16;
         short var6 = com.aspose.cells.b.a.zc.b(this.O, var5);
         int var13 = var5 + 2;
         Border var9 = null;
         boolean var10 = false;

         for(int var11 = 0; var11 < var6; ++var11) {
            short var8;
            short var7 = com.aspose.cells.b.a.zc.b(this.O, var13);
            var8 = com.aspose.cells.b.a.zc.b(this.O, var13 + 2);
            boolean[] var14;
            label106:
            switch(var7) {
            case 0:
               var2.b.setPattern(zcee.p(this.O[var13 + 4] & 255));
               break;
            case 1:
               var14 = new boolean[]{var10};
               var2.b.b = this.a(this.O, var13 + 4, var14);
               var10 = var14[0];
               var2.b.b(34);
               break;
            case 2:
               var14 = new boolean[]{var10};
               var2.b.a = this.a(this.O, var13 + 4, var14);
               var10 = var14[0];
               var2.b.b(35);
            case 3:
            case 4:
            case 21:
            case 23:
            case 30:
            case 31:
            case 32:
            case 33:
            case 39:
            case 40:
            case 42:
            default:
               break;
            case 5:
               var14 = new boolean[]{var10};
               var2.a().b = this.a(this.O, var13 + 4, var14);
               var10 = var14[0];
               var2.b.b(16);
               break;
            case 6:
               this.a(var2.b.getBorders().getByBorderType(4), this.O, var13 + 4);
               break;
            case 7:
               this.a(var2.b.getBorders().getByBorderType(8), this.O, var13 + 4);
               break;
            case 8:
               this.a(var2.b.getBorders().getByBorderType(1), this.O, var13 + 4);
               break;
            case 9:
               this.a(var2.b.getBorders().getByBorderType(2), this.O, var13 + 4);
               break;
            case 10:
               if (var3) {
                  var9 = var2.b.getBorders().getByBorderType(32);
                  this.a(var9, this.O, var13 + 4);
               } else if (var4) {
                  this.a(var2.b.getBorders().getByBorderType(16), this.O, var13 + 4);
               }
               break;
            case 11:
               this.a(var2.b.getBorders().getByBorderType(4), this.O, var13 + 4);
               this.a(var2.b.getBorders().getByBorderType(8), this.O, var13 + 4);
               break;
            case 12:
               this.a(var2.b.getBorders().getByBorderType(1), this.O, var13 + 4);
               this.a(var2.b.getBorders().getByBorderType(2), this.O, var13 + 4);
               break;
            case 13:
               var3 = this.O[var13 + 4] == 1;
               break;
            case 14:
               var4 = this.O[var13 + 4] == 1;
               break;
            case 15:
               var2.b.setHorizontalAlignment(zcee.g(this.O[var13 + 4] & 255));
               break;
            case 16:
               var2.b.setVerticalAlignment(zcee.e(this.O[var13 + 4] & 255));
               break;
            case 17:
               var2.b.setRotationAngle(this.O[var13 + 4]);
               break;
            case 18:
               var2.b.setIndentLevel(com.aspose.cells.b.a.zc.b(this.O, var13 + 4));
               break;
            case 19:
               switch(this.O[var13 + 4]) {
               case 1:
                  var2.b.setTextDirection(1);
                  break label106;
               case 2:
                  var2.b.setTextDirection(2);
                  break label106;
               default:
                  var2.b.setTextDirection(0);
                  break label106;
               }
            case 20:
               var2.b.setTextWrapped(this.O[var13 + 4] != 0);
               break;
            case 22:
               var2.b.setShrinkToFit(this.O[var13 + 4] != 0);
               break;
            case 24:
               var2.a().a(zcch.e(this.O, var13 + 4), 0);
               break;
            case 25:
               var2.a().b(com.aspose.cells.b.a.zc.b(this.O, var13 + 4));
               break;
            case 26:
               var2.a().setUnderline(zcee.c((int)com.aspose.cells.b.a.zc.b(this.O, var13 + 4)));
               break;
            case 27:
               switch(this.O[var13 + 4]) {
               case 1:
                  var2.a().setSuperscript(true);
                  break label106;
               case 2:
                  var2.a().setSubscript(true);
               default:
                  break label106;
               }
            case 28:
               var2.a().setItalic(this.O[var13 + 4] != 0);
               break;
            case 29:
               var2.a().setStrikeout(this.O[var13 + 4] != 0);
               break;
            case 34:
               var2.a().setCharset(this.O[var13 + 4]);
               break;
            case 35:
               var2.a().a(this.O[var13 + 4]);
               break;
            case 36:
               var2.a().c(com.aspose.cells.b.a.zc.b(this.O, var13 + 4));
               break;
            case 37:
               var2.a().e(zcee.c(this.O[var13 + 4]));
               break;
            case 38:
               int var12 = var13 + 4;
               var2.b.setCustom(zcch.e(this.O, var12));
               break;
            case 41:
               var2.b.d(com.aspose.cells.b.a.zc.b(this.O, var13 + 4));
               break;
            case 43:
               var2.b.setFormulaHidden(this.O[var13 + 4] != 0);
               break;
            case 44:
               var2.b.setLocked(this.O[var13 + 4] != 0);
            }

            var13 += var8;
         }

         this.d.getDxfs().b(var2.b);
      }
   }

   private void a(DataSorter var1, zpb var2) throws Exception {
      var1.setSortLeftToRight((this.O[12] & 255 & 1) != 0);
      var1.setCaseSensitive((this.O[12] & 255 & 2) != 0);
      if ((this.O[12] & 255 & 4) != 0) {
         var1.b = "pinYin";
      }

      CellArea var3 = new CellArea();
      var3.StartRow = com.aspose.cells.b.a.zc.a(this.O, 14);
      var3.EndRow = com.aspose.cells.b.a.zc.e(this.O, 18) & '\uffff';
      var3.StartColumn = com.aspose.cells.b.a.zc.e(this.O, 22) & '\uffff';
      var3.EndColumn = com.aspose.cells.b.a.zc.e(this.O, 26) & '\uffff';
      var1.a(var3);
      int var4 = com.aspose.cells.b.a.zc.a(this.O, 30);

      while(var4 > 0) {
         --var4;
         this.L = var2.b(this.N);
         if ((this.L & '\uffff') != 2175) {
            var2.a(-2);
            break;
         }

         this.a(var2);
         int var5 = com.aspose.cells.b.a.zc.e(this.O, 12);
         zql var6 = new zql(var1);
         int var7;
         Style var8;
         int var11;
         switch((var5 & '\uffff') >> 1 & 15) {
         case 0:
            String var10 = null;
            var11 = com.aspose.cells.b.a.zc.a(this.O, 38);
            if (var11 > 0) {
               if (this.O[42] == 0) {
                  var10 = Encoding.getASCII().a(this.O, 43, var11);
               } else {
                  var10 = Encoding.getUnicode().a(this.O, 43, var11 * 2);
               }
            }

            var6.a(var10);
            break;
         case 1:
            var7 = com.aspose.cells.b.a.zc.a(this.O, 30);
            if (var7 > -1 && var7 < this.d.getDxfs().getCount()) {
               var8 = new Style(var1.a.getWorksheets());
               var8.copy(var1.a.getWorksheets().getDxfs().get(var7));
               var6.b(var8);
            }
            break;
         case 2:
            var7 = com.aspose.cells.b.a.zc.a(this.O, 30);
            if (var7 > -1 && var7 < this.d.getDxfs().getCount()) {
               var8 = new Style(var1.a.getWorksheets());
               var8.copy(var1.a.getWorksheets().getDxfs().get(var7));
               var6.c(var8);
            }
            break;
         case 3:
            var6.a(zsk.e(com.aspose.cells.b.a.zc.a(this.O, 30)), com.aspose.cells.b.a.zc.a(this.O, 34));
            break;
         default:
            continue;
         }

         if ((var5 & '\uffff' & 1) != 0) {
            var6.a(1);
         }

         var1.a(var6);
         if (var1.getSortLeftToRight()) {
            var7 = com.aspose.cells.b.a.zc.a(this.O, 14);
            var11 = com.aspose.cells.b.a.zc.a(this.O, 18);
         } else {
            var7 = com.aspose.cells.b.a.zc.a(this.O, 22);
            var11 = com.aspose.cells.b.a.zc.a(this.O, 26);
         }

         var6.b(var7);

         while(var7 < var11) {
            ++var7;
            zql var9 = new zql(var1);
            var9.a(var6);
            var9.b(var7);
            var1.a(var9);
         }
      }

   }

   byte[] a() {
      return this.O;
   }

   int b() {
      return this.M;
   }
}
